diff options
author | Samruddhi Khandale <skhandale@microsoft.com> | 2023-08-19 02:01:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-19 02:01:50 +0300 |
commit | a4b31f314fa1385950a9dbc81682d9acb2e2fba9 (patch) | |
tree | 75bf2f793d346389c1c4031e81ad756b7a870b4b /src/docker-in-docker/install.sh | |
parent | 9fd5daf06b40794a067c4cdbb8e258d99eeefc24 (diff) |
[docker-in-docker] Reverts the retry logic (#659)feature_docker-in-docker_2.3.1
* Update install.sh
* [docker-in-docker] Update retry logic
* revert the retry logic!
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. |