@@ -12,12 +12,11 @@ ARG BUILD_TYPE=dev
12
12
# binary into the container image of the target platform ($TARGETPLATFORM)
13
13
# that was specified with --platform. For more details see:
14
14
# https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/
15
- FROM registry.access.redhat.com/ubi9/go-toolset:1.22.9-1739801907 AS builder-release
15
+ FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.23 AS builder-release
16
+ # openshift-golang-builder: GOFLAGS is set to "-mod" by default in our builder image.
17
+ # We need to disable that to keep the build running.
18
+ ENV GOFLAGS=""
16
19
ARG YQ_VERSION
17
- # "USER root" is required for podman builds
18
- USER root
19
- # the build process assumes go is under "/go", so let's make sure it works
20
- RUN ln -s /opt/app-root/src/go /go
21
20
RUN go install github.com/mikefarah/yq/v4@$YQ_VERSION
22
21
23
22
# This registering RHEL when building on an unsubscribed system
@@ -43,7 +42,6 @@ ARG RELEASE_BUILD
43
42
ARG COMMIT
44
43
ARG VERSION
45
44
ARG TARGETARCH
46
- USER root
47
45
48
46
WORKDIR /work
49
47
COPY cloud-api-adaptor/go.mod cloud-api-adaptor/go.sum ./cloud-api-adaptor/
@@ -59,8 +57,8 @@ COPY cloud-api-adaptor/proto ./proto
59
57
60
58
# Set the desired cloud providers for our downstream build (not upsream default)
61
59
ENV BUILTIN_CLOUD_PROVIDERS="strictfipsruntime aws azure ibmcloud vsphere libvirt gcp"
62
- # Make sure the PATH and GOPATH are set appropriately - our builder image being different, the upstream scripts fail otherwise
63
- ENV PATH=/opt/app-root/src/go /bin:$PATH
60
+ # Make sure the PATH is set appropriately - our builder image being different, the upstream scripts fail otherwise
61
+ ENV PATH=$GOPATH /bin:$PATH
64
62
RUN CC=gcc make ARCH=$TARGETARCH COMMIT=$COMMIT VERSION=$VERSION RELEASE_BUILD=$RELEASE_BUILD cloud-api-adaptor
65
63
66
64
# FROM builder-release AS iptables
0 commit comments