Initial draft of plugin.
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

This commit is contained in:
Stephan Schnabel 2025-06-18 22:22:07 +02:00
parent a51b159186
commit aa70d85bee
Signed by: stephan.schnabel
SSH key fingerprint: SHA256:99zuzxNGFb5/5P+E/O7ONU2qhUojUe/D8rIPTW+9Xp0
17 changed files with 950 additions and 0 deletions

33
entrypoint.sh Executable file
View file

@ -0,0 +1,33 @@
#!/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"