debian based docker in docker and docker cli images

This commit is contained in:
2025-06-03 13:38:53 -05:00
parent 1b18f8c520
commit 7508cd213e
5 changed files with 215 additions and 0 deletions

25
dockerd-entrypoint.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
set -e
# Create required directories if they don't exist
mkdir -p /var/run/docker
# Start the Docker daemon in the background
dockerd &
# Wait until Docker is ready
timeout=60
until docker info >/dev/null 2>&1; do
if [ $timeout -le 0 ]; then
echo >&2 "❌ Docker daemon failed to start within expected time."
exit 1
fi
echo "⏳ Waiting for Docker to be ready... ($timeout)"
sleep 1
timeout=$((timeout - 1))
done
echo "✅ Docker daemon is up and running."
# Execute any passed command (default: bash)
exec "$@"