Skip to content

Commit

Permalink
CARRY: Add dedicated Dockerfile for Konflux
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijeet-dhumal authored and ChristianZaccaria committed May 22, 2024
1 parent 00db554 commit fdafd7a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Dockerfile.rhoai
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"]

0 comments on commit fdafd7a

Please sign in to comment.