Skip to content

Instantly share code, notes, and snippets.

@scriptonist
Created March 27, 2019 09:49
Show Gist options
  • Select an option

  • Save scriptonist/44e8d302f003d32903b514ca307c4370 to your computer and use it in GitHub Desktop.

Select an option

Save scriptonist/44e8d302f003d32903b514ca307c4370 to your computer and use it in GitHub Desktop.

Revisions

  1. scriptonist created this gist Mar 27, 2019.
    7 changes: 7 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    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"]