Created
March 27, 2019 09:49
-
-
Save scriptonist/44e8d302f003d32903b514ca307c4370 to your computer and use it in GitHub Desktop.
Cached Deps golang Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.12-alpine | |
RUN apk add -U --no-cache git ca-certificates | |
ADD go.mod go.sum m/ RUN cd m && go mod download | |
ADD . m/ | |
RUN cd m && go install -mod=readonly ./cmd/foo | |
RUN go clean -modcache -cache std | |
ENTRYPOINT ["foo"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment