Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions images/operator-sdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,12 @@ RUN GOOS=linux GOARCH=$TARGETARCH make build/operator-sdk
# Final image.
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.6

# TODO: Figure out how to take the go binary from the builder image so this doesn't have to be maintained.
ENV GO_VERSION=1.23.4

ARG TARGETARCH
RUN microdnf install -y make gcc which tar gzip
RUN curl -sSLo /tmp/go.tar.gz https://golang.org/dl/go${GO_VERSION}.linux-${TARGETARCH}.tar.gz \
&& rm -rf /usr/local/go \
&& tar -C /usr/local -xzf /tmp/go.tar.gz \
&& ln -sf /usr/local/go/bin/* /usr/local/bin/ \
&& rm -f /tmp/go.tar.gz \
&& go version

# Copy Go runtime from builder image
COPY --from=builder /usr/local/go /usr/local/go
RUN ln -sf /usr/local/go/bin/* /usr/local/bin/ && go version

COPY --from=builder /workspace/build/operator-sdk /usr/local/bin/operator-sdk

Expand Down
Loading