diff options
Diffstat (limited to 'src/docker-in-docker/install.sh')
-rwxr-xr-x | src/docker-in-docker/install.sh | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/src/docker-in-docker/install.sh b/src/docker-in-docker/install.sh index f7e5a7d..bdef126 100755 --- a/src/docker-in-docker/install.sh +++ b/src/docker-in-docker/install.sh @@ -423,30 +423,12 @@ dockerd_start="AZURE_DNS_AUTO_DETECTION=${AZURE_DNS_AUTO_DETECTION} DOCKER_DEFAU INNEREOF )" -retry_count=0 -docker_ok="false" - -until [ "${docker_ok}" = "true" ] || [ "${retry_count}" -eq "5" ]; -do - # Start using sudo if not invoked as root - if [ "$(id -u)" -ne 0 ]; then - sudo /bin/sh -c "${dockerd_start}" - else - eval "${dockerd_start}" - fi - - set +e - docker info > /dev/null 2>&1 && docker_ok="true" - - if [ "${docker_ok}" != "true" ]; then - echo "(*) Failed to start docker, retrying in 5s..." - retry_count=`expr $retry_count + 1` - sleep 5s - fi - set -e -done - -set +e +# Start using sudo if not invoked as root +if [ "$(id -u)" -ne 0 ]; then + sudo /bin/sh -c "${dockerd_start}" +else + eval "${dockerd_start}" +fi # Execute whatever commands were passed in (if any). This allows us # to set this script to ENTRYPOINT while still executing the default CMD. |