We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d9631f commit a2e35c9Copy full SHA for a2e35c9
Dockerfile
@@ -1,19 +1,15 @@
1
# Build the manager binary
2
-FROM golang:1.15 as builder
+FROM golang:1.17 as builder
3
4
WORKDIR /workspace
5
-# Copy the Go Modules manifests
6
-COPY go.mod go.mod
7
-COPY go.sum go.sum
+
+# Copy the Go Modules manifests, plus the source
+COPY . ./
8
9
# cache deps before building and copying source so that we don't need to re-download as much
10
# and so that source changes don't invalidate our downloaded layer
11
RUN go mod download
12
-# Copy the go source
13
-COPY main.go main.go
14
-COPY pkg/api api/
15
-COPY pkg/controllers controllers/
16
-
17
# Build
18
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
19
0 commit comments