From c7e4c39a63b5930e10e1fed4acac00b13c1e350b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=A1n=20C=20McCord?= Date: Mon, 25 Oct 2021 20:23:51 -0700 Subject: [PATCH] dockerfile: update for CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Seán C McCord --- Dockerfile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1546cee..57a57db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,17 @@ -FROM ulexus/go-minimal -COPY cycore-web /app +FROM golang:alpine AS builder +ENV GO111MODULE on +RUN apk add --no-cache git +WORKDIR $GOPATH/src/git.cycore.io/cycore/web +COPY . . +RUN go get -d -v +RUN go build -o /go/bin/web + +FROM alpine +RUN apk add --no-cache ca-certificates +COPY --from=builder /go/bin/web /go/bin/web COPY css /css COPY img /img COPY js /js COPY public /public COPY views /views +ENTRYPOINT ["/go/bin/web"]