Skip to content

Commit

Permalink
fix docker pidfile, may resolve #44
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
  • Loading branch information
justincormack committed Mar 11, 2016
1 parent 6973ce7 commit 09daa77
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions alpine/packages/docker/etc/init.d/docker
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ start()

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"
Expand All @@ -28,19 +30,15 @@ start()
[ -d /Mac/$d ] && mkdir -p /$d && mount --bind /Mac/$d /$d
done

command_args="daemon -p \"${pidfile}\" ${DOCKER_OPTS}"

DOCKER_LOGFILE="/var/log/docker.log"

pidfile="/run/docker.pid"

start-stop-daemon --start --quiet \
--background \
--exec ${command} \
--pidfile ${pidfile} \
--stderr "${DOCKER_LOGFILE}" \
--stdout "${DOCKER_LOGFILE}" \
-- ${command_args}
-- daemon --pidfile=${pidfile} ${DOCKER_OPTS}
}

stop()
Expand All @@ -51,6 +49,7 @@ stop()
start-stop-daemon --stop --quiet --pidfile ${pidfile}

# taken from localmount stop script
# XXX fix more cleanly see #35

yesno $RC_GOINGDOWN || return 0
# We never unmount / or /dev or $RC_SVCDIR
Expand Down

0 comments on commit 09daa77

Please sign in to comment.