From fe1908d15499e5bad03b0aed8053eaf55bcfe973 Mon Sep 17 00:00:00 2001 From: Alex Myasoedov Date: Fri, 28 Jun 2019 13:23:05 +0300 Subject: [PATCH] Download mod. --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ca9b7c0..a8e201e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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