mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-15 06:26:57 +00:00
Add MTU propagation docker-shim also to rootless dind runner images
Related to #1201
This commit is contained in:
@@ -2,11 +2,16 @@
|
||||
|
||||
set -Eeuo pipefail
|
||||
|
||||
DOCKER=/usr/bin/docker
|
||||
if [ ! -e $DOCKER ]; then
|
||||
DOCKER=$HOME/bin/docker
|
||||
fi
|
||||
|
||||
if [[ ${ARC_DOCKER_MTU_PROPAGATION:-false} == true ]] &&
|
||||
(($# >= 2)) && [[ $1 == network && $2 == create ]] &&
|
||||
mtu=$(/usr/bin/docker network inspect bridge --format '{{index .Options "com.docker.network.driver.mtu"}}' 2>/dev/null); then
|
||||
mtu=$($DOCKER network inspect bridge --format '{{index .Options "com.docker.network.driver.mtu"}}' 2>/dev/null); then
|
||||
shift 2
|
||||
set -- network create --opt com.docker.network.driver.mtu="$mtu" "$@"
|
||||
fi
|
||||
|
||||
exec /usr/bin/docker "$@"
|
||||
exec $DOCKER "$@"
|
||||
|
||||
Reference in New Issue
Block a user