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