mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 18:41:37 +00:00
clean up docker init
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
e9216cc716
commit
e003a56326
@ -1,11 +1,17 @@
|
|||||||
#!/sbin/openrc-run
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
|
depend()
|
||||||
|
{
|
||||||
|
after 9pudc transfused
|
||||||
|
before chronyd
|
||||||
|
}
|
||||||
|
|
||||||
|
start()
|
||||||
|
{
|
||||||
export DOCKER_RAMDISK="true"
|
export DOCKER_RAMDISK="true"
|
||||||
|
|
||||||
command="${DOCKER_BINARY:-/usr/bin/docker}"
|
command="${DOCKER_BINARY:-/usr/bin/docker}"
|
||||||
|
|
||||||
pidfile="/run/docker.pid"
|
|
||||||
|
|
||||||
# Start with networking on both Mac and Hyper-V, but in
|
# Start with networking on both Mac and Hyper-V, but in
|
||||||
# future change this to use a hypervisor socket.
|
# future change this to use a hypervisor socket.
|
||||||
DOCKER_OPTS="${DOCKER_OPTS} -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"
|
DOCKER_OPTS="${DOCKER_OPTS} -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"
|
||||||
@ -26,19 +32,22 @@ command_args="daemon -p \"${pidfile}\" ${DOCKER_OPTS}"
|
|||||||
|
|
||||||
DOCKER_LOGFILE="/var/log/docker.log"
|
DOCKER_LOGFILE="/var/log/docker.log"
|
||||||
|
|
||||||
start_stop_daemon_args="--background \
|
pidfile="/run/docker.pid"
|
||||||
--stderr \"${DOCKER_LOGFILE}\" --stdout \"${DOCKER_LOGFILE}\""
|
|
||||||
|
|
||||||
depend()
|
start-stop-daemon --start --quiet \
|
||||||
{
|
--background \
|
||||||
after 9pudc transfused
|
--exec ${command} \
|
||||||
before chronyd
|
--pidfile ${pidfile} \
|
||||||
|
--stderr "${DOCKER_LOGFILE}" \
|
||||||
|
--stdout "${DOCKER_LOGFILE}" \
|
||||||
|
-- ${command_args}
|
||||||
}
|
}
|
||||||
|
|
||||||
stop()
|
stop()
|
||||||
{
|
{
|
||||||
# stop docker
|
# stop docker
|
||||||
einfo "Stopping docker"
|
einfo "Stopping docker"
|
||||||
|
pidfile="/run/docker.pid"
|
||||||
start-stop-daemon --stop --quiet --pidfile ${pidfile}
|
start-stop-daemon --stop --quiet --pidfile ${pidfile}
|
||||||
|
|
||||||
# taken from localmount stop script
|
# taken from localmount stop script
|
||||||
|
Loading…
Reference in New Issue
Block a user