forked from kubernetes-sigs/kueue
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CARRY: Add dedicated Dockerfile for Konflux
- Loading branch information
1 parent
00db554
commit fdafd7a
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Build the manager binary | ||
FROM registry.access.redhat.com/ubi9/go-toolset:1.21 as builder | ||
|
||
WORKDIR /workspace | ||
|
||
RUN git config --global --add safe.directory /workspace | ||
|
||
# Copy the Go Modules manifests | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
# cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
RUN go mod download | ||
|
||
# Copy the go source | ||
COPY . . | ||
|
||
# Build | ||
RUN make build GO_BUILD_ENV='CGO_ENABLED=1 GOOS=linux' | ||
|
||
FROM registry.access.redhat.com/ubi9/ubi:latest | ||
|
||
WORKDIR / | ||
USER root | ||
COPY --from=builder /workspace/bin/manager /manager | ||
USER 65532:65532 | ||
|
||
ENTRYPOINT ["/manager"] |