Download mod.

This commit is contained in:
Alex Myasoedov 2019-06-28 13:23:05 +03:00
parent fe71fe8133
commit fe1908d154

View file

@ -3,9 +3,11 @@ FROM golang:1.12 AS compiler
WORKDIR $GOPATH/src/github.com/msoedov/hacker-slides
ENV GO111MODULE on
RUN go mod download
COPY . .
RUN GOOS=linux CGO_ENABLE=0 go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o app *.go
RUN cp app /bin/app
RUN GOOS=linux CGO_ENABLE=0 go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o /bin/app *.go
FROM alpine:3.8