mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 11:00:25 +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
|
||||
|
||||
depend()
|
||||
{
|
||||
after 9pudc transfused
|
||||
before chronyd
|
||||
}
|
||||
|
||||
start()
|
||||
{
|
||||
export DOCKER_RAMDISK="true"
|
||||
|
||||
command="${DOCKER_BINARY:-/usr/bin/docker}"
|
||||
|
||||
pidfile="/run/docker.pid"
|
||||
|
||||
# Start with networking on both Mac and Hyper-V, but in
|
||||
# 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"
|
||||
@ -26,19 +32,22 @@ command_args="daemon -p \"${pidfile}\" ${DOCKER_OPTS}"
|
||||
|
||||
DOCKER_LOGFILE="/var/log/docker.log"
|
||||
|
||||
start_stop_daemon_args="--background \
|
||||
--stderr \"${DOCKER_LOGFILE}\" --stdout \"${DOCKER_LOGFILE}\""
|
||||
pidfile="/run/docker.pid"
|
||||
|
||||
depend()
|
||||
{
|
||||
after 9pudc transfused
|
||||
before chronyd
|
||||
start-stop-daemon --start --quiet \
|
||||
--background \
|
||||
--exec ${command} \
|
||||
--pidfile ${pidfile} \
|
||||
--stderr "${DOCKER_LOGFILE}" \
|
||||
--stdout "${DOCKER_LOGFILE}" \
|
||||
-- ${command_args}
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
# stop docker
|
||||
einfo "Stopping docker"
|
||||
pidfile="/run/docker.pid"
|
||||
start-stop-daemon --stop --quiet --pidfile ${pidfile}
|
||||
|
||||
# taken from localmount stop script
|
||||
|
Loading…
Reference in New Issue
Block a user