blob: 92f4fed488676aa8a7727965f44df2f56c29a47e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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"]
|