diff options
author | Samruddhi Khandale <skhandale@microsoft.com> | 2023-10-05 21:27:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-05 21:27:01 +0300 |
commit | 4fca96b5e8a4bfc93679098cb19d73c65ce571eb (patch) | |
tree | ea9c26feeeaaff8ea77f482ec3ceb8764d4357f3 /src/docker-in-docker/install.sh | |
parent | 0d7ad7c5fcc2569b46035b151dabba3449d1a0a7 (diff) |
[Docker-in-docker] Updates docker-init scripts (#715)feature_docker-in-docker_2.7.0
* updates
* version bump
Diffstat (limited to 'src/docker-in-docker/install.sh')
-rwxr-xr-x | src/docker-in-docker/install.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/docker-in-docker/install.sh b/src/docker-in-docker/install.sh index 63dd567..5a4f0fa 100755 --- a/src/docker-in-docker/install.sh +++ b/src/docker-in-docker/install.sh @@ -362,8 +362,6 @@ EOF tee -a /usr/local/share/docker-init.sh > /dev/null \ << 'EOF' dockerd_start="AZURE_DNS_AUTO_DETECTION=${AZURE_DNS_AUTO_DETECTION} DOCKER_DEFAULT_ADDRESS_POOL=${DOCKER_DEFAULT_ADDRESS_POOL} $(cat << 'INNEREOF' - # Stop dockerd and containerd in case they are already running - docker info > /dev/null 2>&1 && pkill dockerd && pkill containerd # explicitly remove dockerd and containerd PID file to ensure that it can start properly if it was stopped uncleanly find /run /var/run -iname 'docker*.pid' -delete || : find /run /var/run -iname 'container*.pid' -delete || : @@ -478,10 +476,12 @@ do retry_count=`expr $retry_count + 1` done - if [ "${docker_ok}" != "true" ]; then + if [ "${docker_ok}" != "true" ] && [ "${retry_docker_start_count}" != "4" ]; then echo "(*) Failed to start docker, retrying..." - sudo_if pkill dockerd - sudo_if pkill containerd + set +e + sudo_if pkill dockerd + sudo_if pkill containerd + set -e fi retry_docker_start_count=`expr $retry_docker_start_count + 1` |