File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -19,17 +19,12 @@ RUN GOOS=linux GOARCH=$TARGETARCH make build/operator-sdk
1919# Final image.
2020FROM registry.access.redhat.com/ubi9/ubi-minimal:9.6
2121
22- # TODO: Figure out how to take the go binary from the builder image so this doesn't have to be maintained.
23- ENV GO_VERSION=1.23.4
24-
2522ARG TARGETARCH
2623RUN microdnf install -y make gcc which tar gzip
27- RUN curl -sSLo /tmp/go.tar.gz https://golang.org/dl/go${GO_VERSION}.linux-${TARGETARCH}.tar.gz \
28- && rm -rf /usr/local/go \
29- && tar -C /usr/local -xzf /tmp/go.tar.gz \
30- && ln -sf /usr/local/go/bin/* /usr/local/bin/ \
31- && rm -f /tmp/go.tar.gz \
32- && go version
24+
25+ # Copy Go runtime from builder image
26+ COPY --from=builder /usr/local/go /usr/local/go
27+ RUN ln -sf /usr/local/go/bin/* /usr/local/bin/ && go version
3328
3429COPY --from=builder /workspace/build/operator-sdk /usr/local/bin/operator-sdk
3530
You can’t perform that action at this time.
0 commit comments