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
19
19
# Final image.
20
20
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.6
21
21
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
-
25
22
ARG TARGETARCH
26
23
RUN 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
33
28
34
29
COPY --from=builder /workspace/build/operator-sdk /usr/local/bin/operator-sdk
35
30
You can’t perform that action at this time.
0 commit comments