From 0df4948000f950fe1261e220c8e0c126a5dce316 Mon Sep 17 00:00:00 2001 From: Padmanabha Bhat <35250350+bhatpmk@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:23:03 +0530 Subject: [PATCH] VZ-11614: Build ingress-controller v1.3.1 using Go 1.20.12 (#20) * Build using Go 1.20.12 --- build-images.sh | 2 +- images/nginx/rootfs/Dockerfile | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build-images.sh b/build-images.sh index 31c867e040..d9295f6eab 100755 --- a/build-images.sh +++ b/build-images.sh @@ -12,7 +12,7 @@ CONTROLLER_IMAGE=${DOCKER_REPO}/${DOCKER_NAMESPACE}/${CONTROLLER_IMAGE_NAME} WEBHOOK_CERTGEN_IMAGE=${DOCKER_REPO}/${DOCKER_NAMESPACE}/${WEBHOOK_CERTGEN_IMAGE_NAME} # Define custom Golang image -GO_CONTAINER_IMAGE=${GOLANG_IMAGE_NAME:-ghcr.io/verrazzano/golang:v1.20.10} +GO_CONTAINER_IMAGE=${GOLANG_IMAGE_NAME:-ghcr.io/verrazzano/golang:v1.20.12} # Use the latest runner image from controller-v1.9.4, as a workaround to build cmd/dbg, cmd/waitshutdown and cmd/waitshutdown with Go 1.21.3 RUNNER_IMAGE=registry.k8s.io/ingress-nginx/e2e-test-runner:v20231011-8b53cabe0@sha256:ed0dad805c635e66469b4ac376010eebdd0b3fe62d753f58db1632d6f12f451d diff --git a/images/nginx/rootfs/Dockerfile b/images/nginx/rootfs/Dockerfile index cb3ed7b7a6..5e0357977b 100644 --- a/images/nginx/rootfs/Dockerfile +++ b/images/nginx/rootfs/Dockerfile @@ -40,9 +40,11 @@ ENV LUA_CPATH="/usr/local/lib/lua/?/?.so;/usr/local/lib/lua/?.so;;" COPY oracle-epel-ol8.repo /etc/yum.repos.d/ COPY addgroup /usr/sbin/ -COPY adduser /usr/sbin/ COPY dumb-init /usr/bin/ +# Copy adduser to avoid conflict with /usr/sbin/adduser being a symlink to /usr/sbin/useradd +COPY adduser /tmp/ + COPY --from=builder /usr/local /usr/local COPY --from=builder /opt /opt COPY --from=builder /etc/nginx /etc/nginx @@ -56,7 +58,7 @@ RUN microdnf update -y && \ && ln -s /usr/local/nginx/sbin/nginx /sbin/nginx \ && ln -s /usr/local/lib/libluajit-5.1.so.2 /lib64/libluajit-5.1.so.2 \ && addgroup -Sg 101 www-data \ - && adduser -S -D -H -u 101 -h /usr/local/nginx \ + && /tmp/adduser -S -D -H -u 101 -h /usr/local/nginx \ -s /sbin/nologin -G www-data -g www-data www-data \ && bash -eu -c ' \ writeDirs=( \