From ae40196724539ebb0dfb3d33b11339c93adfa03d Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Sat, 19 Nov 2022 07:33:57 -0500 Subject: [PATCH] Pre-create podman storage root Suspected cause of ownership problems when mounting a volume at this location. Signed-off-by: Chris Evich --- Containerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index 49e59f5..1cda0ed 100644 --- a/Containerfile +++ b/Containerfile @@ -98,7 +98,7 @@ RUN sed -i -r \ chmod +x /usr/local/bin/podman-in-podman-maintenance && \ chown -R podman.podman /home/podman && \ rm -f /home/podman/.bash* && \ - echo DOCKER_HOST="unix:///tmp/podman-run-1000/podman/podman.sock" > /etc/profile.d/podman.sh + echo DOCKER_HOST="unix:///tmp/podman-run-1000/podman/podman.sock" > /etc/profile.d/podman.sh && \ # Runtime rootless-mode configuration USER podman @@ -107,6 +107,9 @@ VOLUME ["/home/podman/.local/share/containers/storage/",\ WORKDIR /home/podman ENTRYPOINT ["/usr/local/bin/gitlab-runner-wrapper"] +# Ensure root storage directory exists with correct permissions +RUN mkdir -p .local/share/containers/storage + # Gitlab-runner configuration options. Default to unprivileged (nested) # runner. Privileged is required to permit nested container image building. ARG RUNNER_NAME="qontainers-pipglr"