Skip to content

Commit 859d764

Browse files
authored
1 parent 8e30273 commit 859d764

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22
FROM golang:1.15 as builder
33

44
WORKDIR /workspace
5+
6+
# Dependencies are cached unless we change go.mod or go.sum
7+
COPY go.mod go.mod
8+
COPY go.sum go.sum
9+
RUN go mod download
10+
511
# Copy the go source
612
COPY main.go main.go
713
COPY api/ api/
814
COPY controllers/ controllers/
915
COPY internal/ internal/
10-
# Copy the Go Modules manifests
11-
COPY go.mod go.mod
12-
COPY go.sum go.sum
1316

1417
# Build
1518
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -tags timetzdata -o manager main.go

0 commit comments

Comments
 (0)