From 8505c957191db5420d04ce8330d0ca858e8af058 Mon Sep 17 00:00:00 2001 From: Yusuke Kuoka Date: Fri, 4 Nov 2022 06:29:03 +0900 Subject: [PATCH] runner: Fix rootless dind to respect specified MTU (#1976) While testing #1759, I found an issue in the rootless dind entrypoint that it was not respecting the configured MTU for dind docker due to a permission issue. This fixes that. --- runner/entrypoint-dind-rootless.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runner/entrypoint-dind-rootless.sh b/runner/entrypoint-dind-rootless.sh index b10b0a78..fb7234c7 100644 --- a/runner/entrypoint-dind-rootless.sh +++ b/runner/entrypoint-dind-rootless.sh @@ -14,7 +14,7 @@ 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/ and https://github.com/docker/engine/blob/8955d8da8951695a98eb7e15bead19d402c6eb27/contrib/dockerd-rootless.sh#L13 -echo "DOCKERD_ROOTLESS_ROOTLESSKIT_MTU=${MTU}" >> /etc/environment +echo "DOCKERD_ROOTLESS_ROOTLESSKIT_MTU=${MTU}" | sudo tee -a /etc/environment fi if [ -n "${DOCKER_REGISTRY_MIRROR}" ]; then