From cd198cd2c2e9bdcd2826baa991a8e84a1e35bf9f Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont (@ardumont)" <ardumont@softwareheritage.org> Date: Wed, 1 Feb 2023 16:39:27 +0100 Subject: [PATCH] scripts/Dockerfile: Allow group and user id overwrite This will help jenkins be able to actually run the scripts. Refs. swh/infra/sysadm-environment#4524 --- scripts/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/Dockerfile b/scripts/Dockerfile index ab2738b0f..c6ae421ae 100644 --- a/scripts/Dockerfile +++ b/scripts/Dockerfile @@ -1,10 +1,11 @@ # build-deps container to call scripts/generate-frozen-requirements.txt on an # application (e.g. swh-loader-svn, swh-loader-git, ...) FROM python:3.10-bullseye +ARG userid=1000 +ARG groupid=1000 -RUN addgroup --gid 1000 swh && \ - useradd --gid 1000 --uid 1000 -m -d /opt/swh swh - +RUN addgroup --gid $groupid swh && \ + useradd --gid $groupid --uid $userid -m -d /opt/swh swh # First install the runtime deps of all swh applications RUN apt-get -y update && \ -- GitLab