Skip to content

Commit fdafd7a

Browse files
abhijeet-dhumalChristianZaccaria
authored andcommitted
CARRY: Add dedicated Dockerfile for Konflux
1 parent 00db554 commit fdafd7a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Dockerfile.rhoai

+28
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)