Skip to content

Commit

Permalink
update Dockerfiles to use goang v1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
muraee committed May 28, 2024
1 parent 0bd568b commit 53d4652
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build_root_image:
name: release
namespace: openshift
tag: rhel-9-release-golang-1.21-openshift-4.16
tag: rhel-9-release-golang-1.22-openshift-4.17
29 changes: 10 additions & 19 deletions Containerfile.operator
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
FROM registry.access.redhat.com/ubi9/go-toolset:1.21 as builder
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.22 as builder

WORKDIR /hypershift

COPY . .

# Go toolset runs as user default(1001) with group root. To be able to build in
# rootless mode as podman and ocp do, it is necessary to give permissions for
# file creation to the root group, of which the user default is a member.
#
# Due to CVE-2022-24765, git refuses actions on .git repository it does not own
# Since the COPY command leaves the owner as root but the build is done as the
# default user, we need to set the global git config to consider the working
# directory as a safe one
RUN chmod g+w . && \
git config --global --add safe.directory "$PWD" && \
make build
RUN make build

FROM registry.redhat.io/rhel9-4-els/rhel:9.4
COPY --from=builder \
/opt/app-root/src/bin/hypershift \
/opt/app-root/src/bin/hcp \
/opt/app-root/src/bin/hypershift-operator \
/opt/app-root/src/bin/control-plane-operator \
/opt/app-root/src/bin/control-plane-pki-operator \
/usr/bin/
COPY --from=builder /hypershift/bin/hypershift \
/hypershift/bin/hcp \
/hypershift/bin/hypershift-operator \
/hypershift/bin/control-plane-operator \
/hypershift/bin/control-plane-pki-operator \
/usr/bin/

RUN cd /usr/bin && \
ln -s control-plane-operator ignition-server && \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.ci.openshift.org/openshift/release:rhel-9-release-golang-1.21-openshift-4.16 as builder
FROM registry.ci.openshift.org/openshift/release:rhel-9-release-golang-1.22-openshift-4.17 as builder

WORKDIR /hypershift

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.control-plane
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS builder

WORKDIR /hypershift

Expand Down

0 comments on commit 53d4652

Please sign in to comment.