diff --git a/19.03-rc/dind/dockerd-entrypoint.sh b/19.03-rc/dind/dockerd-entrypoint.sh index d5f59fa9e..1f5625b57 100755 --- a/19.03-rc/dind/dockerd-entrypoint.sh +++ b/19.03-rc/dind/dockerd-entrypoint.sh @@ -138,6 +138,11 @@ if [ "$1" = 'dockerd' ]; then # explicitly remove Docker's default PID file to ensure that it can start properly if it was stopped uncleanly (and thus didn't clean up the PID file) find /run /var/run -iname 'docker*.pid' -delete || : + if dockerd --version | grep -qF ' 20.10.'; then + # XXX inject "docker-init" (tini) as pid1 to workaround https://github.com/docker-library/docker/issues/318 (zombie container-shim processes) + set -- docker-init -- "$@" + fi + uid="$(id -u)" if [ "$uid" != '0' ]; then # if we're not root, we must be trying to run rootless diff --git a/19.03/dind/dockerd-entrypoint.sh b/19.03/dind/dockerd-entrypoint.sh index d5f59fa9e..1f5625b57 100755 --- a/19.03/dind/dockerd-entrypoint.sh +++ b/19.03/dind/dockerd-entrypoint.sh @@ -138,6 +138,11 @@ if [ "$1" = 'dockerd' ]; then # explicitly remove Docker's default PID file to ensure that it can start properly if it was stopped uncleanly (and thus didn't clean up the PID file) find /run /var/run -iname 'docker*.pid' -delete || : + if dockerd --version | grep -qF ' 20.10.'; then + # XXX inject "docker-init" (tini) as pid1 to workaround https://github.com/docker-library/docker/issues/318 (zombie container-shim processes) + set -- docker-init -- "$@" + fi + uid="$(id -u)" if [ "$uid" != '0' ]; then # if we're not root, we must be trying to run rootless diff --git a/20.10-rc/dind/dockerd-entrypoint.sh b/20.10-rc/dind/dockerd-entrypoint.sh index d5f59fa9e..1f5625b57 100755 --- a/20.10-rc/dind/dockerd-entrypoint.sh +++ b/20.10-rc/dind/dockerd-entrypoint.sh @@ -138,6 +138,11 @@ if [ "$1" = 'dockerd' ]; then # explicitly remove Docker's default PID file to ensure that it can start properly if it was stopped uncleanly (and thus didn't clean up the PID file) find /run /var/run -iname 'docker*.pid' -delete || : + if dockerd --version | grep -qF ' 20.10.'; then + # XXX inject "docker-init" (tini) as pid1 to workaround https://github.com/docker-library/docker/issues/318 (zombie container-shim processes) + set -- docker-init -- "$@" + fi + uid="$(id -u)" if [ "$uid" != '0' ]; then # if we're not root, we must be trying to run rootless diff --git a/20.10/dind/dockerd-entrypoint.sh b/20.10/dind/dockerd-entrypoint.sh index d5f59fa9e..1f5625b57 100755 --- a/20.10/dind/dockerd-entrypoint.sh +++ b/20.10/dind/dockerd-entrypoint.sh @@ -138,6 +138,11 @@ if [ "$1" = 'dockerd' ]; then # explicitly remove Docker's default PID file to ensure that it can start properly if it was stopped uncleanly (and thus didn't clean up the PID file) find /run /var/run -iname 'docker*.pid' -delete || : + if dockerd --version | grep -qF ' 20.10.'; then + # XXX inject "docker-init" (tini) as pid1 to workaround https://github.com/docker-library/docker/issues/318 (zombie container-shim processes) + set -- docker-init -- "$@" + fi + uid="$(id -u)" if [ "$uid" != '0' ]; then # if we're not root, we must be trying to run rootless diff --git a/dockerd-entrypoint.sh b/dockerd-entrypoint.sh index d5f59fa9e..1f5625b57 100755 --- a/dockerd-entrypoint.sh +++ b/dockerd-entrypoint.sh @@ -138,6 +138,11 @@ if [ "$1" = 'dockerd' ]; then # explicitly remove Docker's default PID file to ensure that it can start properly if it was stopped uncleanly (and thus didn't clean up the PID file) find /run /var/run -iname 'docker*.pid' -delete || : + if dockerd --version | grep -qF ' 20.10.'; then + # XXX inject "docker-init" (tini) as pid1 to workaround https://github.com/docker-library/docker/issues/318 (zombie container-shim processes) + set -- docker-init -- "$@" + fi + uid="$(id -u)" if [ "$uid" != '0' ]; then # if we're not root, we must be trying to run rootless