Skip to content

Commit bbcb742

Browse files
KPostOfficeFiona-Waters
authored andcommitted
CARRY: use golang version workaround for ubi9 image
Signed-off-by: Kevin <[email protected]>
1 parent 175aa61 commit bbcb742

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

Dockerfile.rhoai

+18-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
1-
# Build the manager binary
2-
FROM registry.access.redhat.com/ubi9/go-toolset:1.21 as builder
1+
# Start of Go versioning workaround for lack of go-toolset for version 1.22
2+
FROM registry-proxy.engineering.redhat.com/rh-osbs/openshift-golang-builder:v1.22.2 AS golang
33

4-
WORKDIR /workspace
4+
FROM registry.access.redhat.com/ubi9/ubi:latest AS builder
5+
6+
ARG GOLANG_VERSION=1.22.2
7+
8+
# Install system dependencies
9+
RUN dnf upgrade -y && dnf install -y \
10+
gcc \
11+
make \
12+
openssl-devel \
13+
&& dnf clean all && rm -rf /var/cache/yum
514

6-
RUN git config --global --add safe.directory /workspace
15+
# Install Go
16+
ENV PATH=/usr/local/go/bin:$PATH
17+
18+
COPY --from=golang /usr/lib/golang /usr/local/go
19+
20+
WORKDIR /workspace
721

822
# Copy the Go Modules manifests
923
COPY go.mod go.mod

0 commit comments

Comments
 (0)