We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00db554 commit fdafd7aCopy full SHA for fdafd7a
Dockerfile.rhoai
@@ -0,0 +1,28 @@
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"]
0 commit comments