Skip to content

Commit

Permalink
Improve dependency caching on build
Browse files Browse the repository at this point in the history
  • Loading branch information
rnorth committed Sep 26, 2020
1 parent 4a92d1b commit 4d7268e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM golang:alpine3.12 AS builder
WORKDIR /go/src/github.com/testcontainers/helloworld
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN go get .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o /helloworld .

FROM scratch
Expand Down

0 comments on commit 4d7268e

Please sign in to comment.