mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-12 01:30:21 +00:00
33 lines
926 B
Plaintext
Executable File
33 lines
926 B
Plaintext
Executable File
#!/sbin/openrc-run
|
|
|
|
export DOCKER_RAMDISK="true"
|
|
|
|
command="${DOCKER_BINARY:-/usr/bin/docker}"
|
|
|
|
pidfile="/run/docker.pid"
|
|
|
|
if cat /proc/cmdline | grep -q 'com.docker.database'
|
|
then
|
|
DATABASE="$(cat /proc/cmdline | sed -e 's/.*com.docker.database="//' -e 's/".*//')"
|
|
CONFIG_FILE="/Database/branch/master/ro/${DATABASE}/etc/docker/daemon.json"
|
|
[ -s ${CONFIG_FILE} ] && DOCKER_OPTS="${DOCKER_OPTS} --config-file ${CONFIG_FILE}"
|
|
else
|
|
# If there is no database and we run on Hyper-V start daemon
|
|
# with networking for now. This will change in the future!
|
|
[ -d /sys/bus/vmbus ] && DOCKER_OPTS="${DOCKER_OPTS} -H tcp://0.0.0.0:2375"
|
|
fi
|
|
|
|
|
|
command_args="daemon -p \"${pidfile}\" ${DOCKER_OPTS}"
|
|
|
|
DOCKER_LOGFILE="/var/log/docker.log"
|
|
|
|
start_stop_daemon_args="--background \
|
|
--stderr \"${DOCKER_LOGFILE}\" --stdout \"${DOCKER_LOGFILE}\""
|
|
|
|
depend()
|
|
{
|
|
after 9pudc 9pudfuse
|
|
before chronyd
|
|
}
|