mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-11 12:06:57 +00:00
Fix permission issue when you use PV for rootless dind cache (#1977)
* Fix permission issue when you use PV for rootless dind cache This fixes the said issue I have found while testing #1759. Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
@@ -22,6 +22,17 @@ jq ".\"registry-mirrors\"[0] = \"${DOCKER_REGISTRY_MIRROR}\"" /home/runner/.conf
|
||||
fi
|
||||
SCRIPT
|
||||
|
||||
if [ -d /home/runner/.local ]; then
|
||||
if [ ! -d /home/runner/.local/share ]; then
|
||||
log.notice "Creating /home/runner/.local/share owned by runner:runner \
|
||||
so that rootless dockerd will not fail with a permission error when creating /home/runner/.local/share/docker"
|
||||
|
||||
sudo mkdir /home/runner/.local/share
|
||||
sudo chmod 755 /home/runner/.local/share
|
||||
sudo chown runner:runner /home/runner/.local/share
|
||||
fi
|
||||
fi
|
||||
|
||||
log.notice "Starting Docker (rootless)"
|
||||
|
||||
dumb-init bash <<'SCRIPT' &
|
||||
|
||||
Reference in New Issue
Block a user