diff options
author | 2020-12-08 01:21:04 +0000 | |
---|---|---|
committer | 2020-12-08 01:21:04 +0000 | |
commit | ba76c05ceca6a7879678873f360cdaf575f0f493 (patch) | |
tree | 597f2ee142ca4e57f1daffd29286e533c10a397a /Dockerfile | |
download | go-gentoo-ba76c05ceca6a7879678873f360cdaf575f0f493.tar.gz go-gentoo-ba76c05ceca6a7879678873f360cdaf575f0f493.tar.bz2 go-gentoo-ba76c05ceca6a7879678873f360cdaf575f0f493.zip |
Initial version
Signed-off-by: Max Magorsch <arzano@gentoo.org>
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..92f4fed --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM golang:1.14.0 AS builder +WORKDIR /go/src/go-gentoo +COPY . /go/src/go-gentoo +RUN go get github.com/go-pg/pg/v9 +RUN go get github.com/mcuadros/go-version +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o bin . + +FROM scratch +WORKDIR /go/src/go-gentoo +COPY --from=builder /go/src/go-gentoo/assets /go/src/go-gentoo/assets +COPY --from=builder /go/src/go-gentoo/bin /go/src/go-gentoo/bin +COPY --from=builder /go/src/go-gentoo/pkg /go/src/go-gentoo/pkg +COPY --from=builder /go/src/go-gentoo/web /go/src/go-gentoo/web +ENTRYPOINT ["/go/src/go-gentoo/bin/go-gentoo", "--serve"] |