From b0265d73d50ce6c0f444bed2e26ed3bc8a8c1d11 Mon Sep 17 00:00:00 2001 From: Evan Wilde Date: Mon, 22 Jun 2026 13:44:06 -0700 Subject: [PATCH] UBI9: Configurable build user id Making the builder-user ID configurable through the docker invocation means that folks can use volumes to map an existing Swift checkout on their host into the container to build in this environment without running into issues with permissions in the build directory. e.g. `docker build --build-arg BUILD_USER_ID=$(id -u) ...` By default, the `BUILD_USER_ID` is `42`, matching the existing setup. --- swift-ci/main/rhel-ubi/9/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/swift-ci/main/rhel-ubi/9/Dockerfile b/swift-ci/main/rhel-ubi/9/Dockerfile index 57d90c6a5..ff77f61d3 100644 --- a/swift-ci/main/rhel-ubi/9/Dockerfile +++ b/swift-ci/main/rhel-ubi/9/Dockerfile @@ -1,7 +1,9 @@ FROM redhat/ubi9 -RUN groupadd -g 42 build-user && \ - useradd -m -r -u 42 -g build-user build-user +ARG BUILD_USER_ID=42 + +RUN groupadd -g ${BUILD_USER_ID} build-user && \ + useradd -m -r -u ${BUILD_USER_ID} -g build-user build-user RUN yum install -y \ git \