first commit
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
This commit is contained in:
22
docker/unauthorized-rce/docker-entrypoint.sh
Normal file
22
docker/unauthorized-rce/docker-entrypoint.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# no arguments passed
|
||||
# or first arg is `-f` or `--some-option`
|
||||
if [ "$#" -eq 0 -o "${1#-}" != "$1" ]; then
|
||||
# add our default arguments
|
||||
set -- dockerd \
|
||||
--host=unix:///var/run/docker.sock \
|
||||
--host=tcp://0.0.0.0:2375 \
|
||||
"$@"
|
||||
fi
|
||||
|
||||
if [ "$1" = 'dockerd' ]; then
|
||||
# if we're running Docker, let's pipe through dind
|
||||
# (and we'll run dind explicitly with "sh" since its shebang is /bin/bash)
|
||||
set -- sh "$(which dind)" "$@"
|
||||
fi
|
||||
|
||||
# Start crond process
|
||||
crond -b -L /var/log/crond.log
|
||||
exec "$@"
|
Reference in New Issue
Block a user