Fix inability to configure MTU for rootless dind runner (#1856)

Follow-up for https://github.com/actions-runner-controller/actions-runner-controller/pull/1644
This commit is contained in:
Yusuke Kuoka 2022-10-13 09:04:56 +09:00 committed by GitHub
parent 710e2fbc3a
commit e1762ba746
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -11,8 +11,8 @@ fi
if [ -n "${MTU}" ]; then
jq ".\"mtu\" = ${MTU}" /home/runner/.config/docker/daemon.json > /tmp/.daemon.json && mv /tmp/.daemon.json /home/runner/.config/docker/daemon.json
# See https://docs.docker.com/engine/security/rootless/
echo "environment=DOCKERD_ROOTLESS_ROOTLESSKIT_MTU=${MTU}" >> /etc/supervisor/conf.d/dockerd.conf
# See https://docs.docker.com/engine/security/rootless/ and https://github.com/docker/engine/blob/8955d8da8951695a98eb7e15bead19d402c6eb27/contrib/dockerd-rootless.sh#L13
echo "DOCKERD_ROOTLESS_ROOTLESSKIT_MTU=${MTU}" >> /etc/environment
fi
if [ -n "${DOCKER_REGISTRY_MIRROR}" ]; then