File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Build the manager binary
2
+ FROM registry.access.redhat.com/ubi9/go-toolset:1.21 as builder
3
+
4
+ WORKDIR /workspace
5
+
6
+ RUN git config --global --add safe.directory /workspace
7
+
8
+ # Copy the Go Modules manifests
9
+ COPY go.mod go.mod
10
+ COPY go.sum go.sum
11
+ # cache deps before building and copying source so that we don't need to re-download as much
12
+ # and so that source changes don't invalidate our downloaded layer
13
+ RUN go mod download
14
+
15
+ # Copy the go source
16
+ COPY . .
17
+
18
+ # Build
19
+ RUN make build GO_BUILD_ENV='CGO_ENABLED=1 GOOS=linux'
20
+
21
+ FROM registry.access.redhat.com/ubi9/ubi:latest
22
+
23
+ WORKDIR /
24
+ USER root
25
+ COPY --from=builder /workspace/bin/manager /manager
26
+ USER 65532:65532
27
+
28
+ ENTRYPOINT ["/manager"]
You can’t perform that action at this time.
0 commit comments