From 5251497dc263d5ed4d255b21e3fb4dec961934da Mon Sep 17 00:00:00 2001 From: Lester Amoin Espiritu Date: Fri, 3 Jan 2025 22:00:13 +0800 Subject: [PATCH] Explicitly indicate the root user for some runlabels --- Containerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index 44d7492..010d6bf 100644 --- a/Containerfile +++ b/Containerfile @@ -70,7 +70,8 @@ ARG ENABLE_FIPS=true # may be changed if you know what you're doing. LABEL register="podman run -it --rm \ --secret=REGISTRATION_TOKEN,type=env \ - -v ./config.toml:/home/podman/.gitlab-runner/config.toml:Z \ + --user=root \ + -v ./config.toml:/etc/gitlab-runner/config.toml:Z \ -e REGISTER_NON_INTERACTIVE=true \ -e CI_SERVER_URL=${GITLAB_URL} \ -e RUNNER_NAME=pipglr \ @@ -95,6 +96,7 @@ LABEL setupcache="podman volume create --opt o=uid=1000,gid=1001 pipglr-cache" # Helper to extract the current configuration secret to allow editing. LABEL dumpconfig="podman run -it --rm \ + --user=root \ --secret config.toml --entrypoint=/bin/cat \ \$IMAGE /var/run/secrets/config.toml" @@ -103,6 +105,7 @@ LABEL dumpconfig="podman run -it --rm \ # Note: The contents of the volumes are not critical, they may be removed # and re-created (see above) to quickly free-up disk space. LABEL run="podman run -dt --name pipglr \ + --user=root \ --secret config.toml,uid=1001,gid=1001 \ -v pipglr-storage:/home/podman/.local/share/containers \ -v pipglr-cache:/cache \