Skip to content

Commit 7f3d2f1

Browse files
[Cleanup] Remove explicit go1.23 install in the Dockerfile (#640)
* Remove explicit go1.23 install in the Dockerfile * Move base image to specific go version image * update dependency build container to rhel_9_golang_1.23 tag
1 parent 45b2e8a commit 7f3d2f1

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

Dockerfile

+7-16
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,11 @@ RUN yum --assumeyes install \
1010
&& yum clean all;
1111

1212
### Build backplane-cli
13-
FROM registry.access.redhat.com/ubi9/ubi:9.5 as bp-cli-builder
13+
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.23 as bp-cli-builder
1414

15-
RUN yum install --assumeyes \
16-
make \
17-
git \
18-
wget \
19-
go-toolset
20-
21-
# Install Go 1.23.6 properly
22-
RUN go install golang.org/dl/go1.23.6@latest
23-
RUN /root/go/bin/go1.23.6 download
2415

2516
# Configure the env
26-
ENV PATH="/root/sdk/go1.23.6/bin:${PATH}"
17+
2718
RUN go env -w GOTOOLCHAIN=go1.23.6+auto
2819

2920
#Environment variables
@@ -43,12 +34,8 @@ RUN cp ./ocm-backplane /out
4334
RUN chmod -R +x /out
4435

4536
### Build dependencies
46-
FROM registry.access.redhat.com/ubi9/ubi:9.5 as dep-builder
37+
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.23 as dep-builder
4738

48-
RUN yum install --assumeyes \
49-
jq \
50-
unzip \
51-
wget
5239

5340
ARG GITHUB_URL="https://api.github.com"
5441
ARG GITHUB_TOKEN=""
@@ -67,6 +54,10 @@ RUN mkdir /out
6754
# Install the latest OC Binary from the mirror
6855
RUN mkdir /oc
6956
WORKDIR /oc
57+
58+
# Download jq packages
59+
RUN curl -sSLo /usr/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 && chmod +x /usr/bin/jq
60+
7061
# Download the checksum
7162
RUN curl -sSLf ${OC_URL}/sha256sum.txt -o sha256sum.txt
7263
# Download the amd64 binary tarball

0 commit comments

Comments
 (0)