Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docker-in-docker] Reverts the retry logic #659

Merged
merged 3 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/docker-in-docker/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "docker-in-docker",
"version": "2.3.0",
"version": "2.3.1",
"name": "Docker (Docker-in-Docker)",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-in-docker",
"description": "Create child containers *inside* a container, independent from the host's docker instance. Installs Docker extension in the container along with needed CLIs.",
Expand Down
5 changes: 3 additions & 2 deletions src/docker-in-docker/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -435,13 +435,14 @@ do
eval "${dockerd_start}"
fi

sleep 5s
joshspicer marked this conversation as resolved.
Show resolved Hide resolved

set +e
docker info > /dev/null 2>&1 && docker_ok="true"

if [ "${docker_ok}" != "true" ]; then
echo "(*) Failed to start docker, retrying in 5s..."
echo "(*) Failed to start docker, retrying..."
retry_count=`expr $retry_count + 1`
sleep 5s
samruddhikhandale marked this conversation as resolved.
Show resolved Hide resolved
fi
set -e
done
Expand Down
5 changes: 3 additions & 2 deletions test/docker-in-docker/test-scripts/docker-test-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ do
/usr/local/share/docker-init.sh
fi

sleep 5s

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: ${retry_count}"
echo "(*) Failed to start docker, retrying... Retry count: ${retry_count}"
retry_count=`expr $retry_count + 1`
sleep 1s
fi
set -e
done
Loading