Explicitly indicate the root user for some runlabels

This commit is contained in:
Lester Amoin Espiritu
2025-01-03 22:00:13 +08:00
parent d371873d07
commit 5251497dc2

View File

@@ -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 \