Add some placeholders to the volume directories to try and fix erratic ownership changes

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

View File

@@ -51,6 +51,7 @@ function main() {
setup_service_podman
setup_service_runner
setup_gitlab_config
setup_volumes
finalize_ownership
}
@@ -153,9 +154,11 @@ function setup_user() {
function setup_volumes() {
# Host volume mount necessary for nested-podman to use overlayfs2 for container & volume storage.
mkdir -p /home/podman/.local/share/containers
touch /home/podman/.local/share/containers/.placeholder
# Nested-container's local container-cache volume mount, recommended by gitlab-runner docs.
mkdir -p /cache
touch /cache/.placeholder
# Both the gitlab-runner and podman need access to the cache directory / volume mount.
chown podman:runner /cache