aboutsummaryrefslogtreecommitdiff
path: root/src/docker-in-docker/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/docker-in-docker/install.sh')
-rwxr-xr-xsrc/docker-in-docker/install.sh30
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.