Skip to content

Commit 5254953

Browse files
authored
Merge pull request #1608 from simonbaird/go-toolset-for-redhat-build-2
Use go-toolset golang base image for redhat builds
2 parents f04956c + 5a8f39e commit 5254953

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

Dockerfile.dist

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,15 @@
1919
# This works fine but will produce an EC violation
2020
# FROM docker.io/library/golang:1.21 AS build
2121

22-
# This currently has go version 1.20 but we need version 1.21
23-
#FROM registry.access.redhat.com/ubi9/go-toolset:latest AS build
24-
25-
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.4@sha256:2636170dc55a0931d013014a72ae26c0c2521d4b61a28354b3e2e5369fa335a3 AS build
22+
FROM registry.access.redhat.com/ubi9/go-toolset:1.21@sha256:f04d515e747fbd9ef5e55a7d34808e4abf1d62623515d0e97c12b51cc0008de3 AS build
2623

2724
ARG BUILD_SUFFIX="redhat"
2825
ARG BUILD_LIST="darwin_amd64 darwin_arm64 linux_amd64 linux_arm64 linux_ppc64le linux_s390x windows_amd64"
2926
ARG TARGETOS
3027
ARG TARGETARCH
3128

32-
RUN microdnf -y --nodocs --setopt=keepcache=0 install golang git-core
29+
# Avoid safe directory git failures building with default user from go-toolset
30+
USER root
3331

3432
WORKDIR /build
3533

0 commit comments

Comments
 (0)