docker/entrypoint.sh
Stephan Schnabel aa70d85bee
All checks were successful
ci/woodpecker/push/dockerhub Pipeline was successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
Initial draft of plugin.
2025-06-21 21:00:48 +02:00

33 lines
870 B
Bash
Executable file

#!/bin/bash
set -e;
# https://docs.docker.com/reference/cli/dockerd/
##
## build command to execute
##
COMMAND="dockerd --host=0.0.0.0:${DOCKERD_PORT:-2375} --tls=false --data-root=/woodpecker/dockerd --feature=buildkit=true --feature=containerd-snapshotter=true --shutdown-timeout=${DOCKERD_SHUTDOWN_TIMEOUT:-0} "
if [[ -n "$DOCKERD_LOG_LEVEL" ]]; then
COMMAND+=" --log-level=$DOCKERD_LOG_LEVEL"
fi
if [[ -n "$DOCKERD_REGISTRY_MIRROR" ]]; then
COMMAND+=" --registry-mirror=$DOCKERD_REGISTRY_MIRROR"
if [[ "$DOCKERD_REGISTRY_MIRROR" =~ ^http:\/\/.*$ ]]; then
COMMAND+=" --insecure-registry=${DOCKERD_REGISTRY_MIRROR//http:\/\//}"
fi
fi
if [[ -n "$DOCKERD_INSECURE_REGISTRY" ]]; then
COMMAND+=" --insecure-registry=$DOCKERD_INSECURE_REGISTRY"
fi
##
## execute command
##
echo
echo Running now:
echo
echo -e " ${COMMAND// --/ \\n --}"
echo
eval "$COMMAND"