Skip to content

Commit

Permalink
CARRY: use golang version workaround for ubi9 image
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin <[email protected]>
  • Loading branch information
KPostOffice authored and Fiona-Waters committed Aug 12, 2024
1 parent 175aa61 commit bbcb742
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions Dockerfile.rhoai
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
# Build the manager binary
FROM registry.access.redhat.com/ubi9/go-toolset:1.21 as builder
# Start of Go versioning workaround for lack of go-toolset for version 1.22
FROM registry-proxy.engineering.redhat.com/rh-osbs/openshift-golang-builder:v1.22.2 AS golang

WORKDIR /workspace
FROM registry.access.redhat.com/ubi9/ubi:latest AS builder

ARG GOLANG_VERSION=1.22.2

# Install system dependencies
RUN dnf upgrade -y && dnf install -y \
gcc \
make \
openssl-devel \
&& dnf clean all && rm -rf /var/cache/yum

RUN git config --global --add safe.directory /workspace
# Install Go
ENV PATH=/usr/local/go/bin:$PATH

COPY --from=golang /usr/lib/golang /usr/local/go

WORKDIR /workspace

# Copy the Go Modules manifests
COPY go.mod go.mod
Expand Down

0 comments on commit bbcb742

Please sign in to comment.