debian based docker in docker and docker cli images
This commit is contained in:
25
dockerd-entrypoint.sh
Executable file
25
dockerd-entrypoint.sh
Executable 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 "$@"
|
||||
Reference in New Issue
Block a user