mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
contrib: init: use dockerd
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
08ec3606f1
commit
1ac1b78b3a
7 changed files with 14 additions and 14 deletions
|
@ -7,7 +7,7 @@
|
|||
#DOCKER_PIDFILE="/run/docker.pid"
|
||||
|
||||
# where the docker daemon itself is run from
|
||||
#DOCKER_BINARY="/usr/bin/docker"
|
||||
#DOCKERD_BINARY="/usr/bin/dockerd"
|
||||
|
||||
# any other random options you want to pass to docker
|
||||
DOCKER_OPTS=""
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
command="${DOCKER_BINARY:-/usr/bin/docker}"
|
||||
command="${DOCKERD_BINARY:-/usr/bin/dockerd}"
|
||||
pidfile="${DOCKER_PIDFILE:-/run/${RC_SVCNAME}.pid}"
|
||||
command_args="daemon -p \"${pidfile}\" ${DOCKER_OPTS}"
|
||||
command_args="-p \"${pidfile}\" ${DOCKER_OPTS}"
|
||||
DOCKER_LOGFILE="${DOCKER_LOGFILE:-/var/log/${RC_SVCNAME}.log}"
|
||||
start_stop_daemon_args="--background \
|
||||
--stderr \"${DOCKER_LOGFILE}\" --stdout \"${DOCKER_LOGFILE}\""
|
||||
|
|
|
@ -9,7 +9,7 @@ Type=notify
|
|||
# the default is not to use systemd for cgroups because the delegate issues still
|
||||
# exists and systemd currently does not support the cgroup feature set required
|
||||
# for containers run by docker
|
||||
ExecStart=/usr/bin/docker daemon -H fd://
|
||||
ExecStart=/usr/bin/dockerd -H fd://
|
||||
ExecReload=/bin/kill -s HUP $MAINPID
|
||||
MountFlags=slave
|
||||
LimitNOFILE=1048576
|
||||
|
|
|
@ -22,7 +22,7 @@ export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
|
|||
BASE=docker
|
||||
|
||||
# modify these in /etc/default/$BASE (/etc/default/docker)
|
||||
DOCKER=/usr/bin/$BASE
|
||||
DOCKERD=/usr/bin/dockerd
|
||||
# This is the pid file managed by docker itself
|
||||
DOCKER_PIDFILE=/var/run/$BASE.pid
|
||||
# This is the pid file created/managed by start-stop-daemon
|
||||
|
@ -39,8 +39,8 @@ if [ -f /etc/default/$BASE ]; then
|
|||
fi
|
||||
|
||||
# Check docker is present
|
||||
if [ ! -x $DOCKER ]; then
|
||||
log_failure_msg "$DOCKER not present or not executable"
|
||||
if [ ! -x $DOCKERD ]; then
|
||||
log_failure_msg "$DOCKERD not present or not executable"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -103,11 +103,11 @@ case "$1" in
|
|||
log_begin_msg "Starting $DOCKER_DESC: $BASE"
|
||||
start-stop-daemon --start --background \
|
||||
--no-close \
|
||||
--exec "$DOCKER" \
|
||||
--exec "$DOCKERD" \
|
||||
--pidfile "$DOCKER_SSD_PIDFILE" \
|
||||
--make-pidfile \
|
||||
-- \
|
||||
daemon -p "$DOCKER_PIDFILE" \
|
||||
-p "$DOCKER_PIDFILE" \
|
||||
$DOCKER_OPTS \
|
||||
>> "$DOCKER_LOGFILE" 2>&1
|
||||
log_end_msg $?
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#
|
||||
|
||||
# Customize location of Docker binary (especially for development testing).
|
||||
#DOCKER="/usr/local/bin/docker"
|
||||
#DOCKERD="/usr/local/bin/dockerd"
|
||||
|
||||
# Use DOCKER_OPTS to modify the daemon startup options.
|
||||
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
prog="docker"
|
||||
prog="dockerd"
|
||||
unshare=/usr/bin/unshare
|
||||
exec="/usr/bin/$prog"
|
||||
pidfile="/var/run/$prog.pid"
|
||||
|
@ -56,7 +56,7 @@ start() {
|
|||
prestart
|
||||
printf "Starting $prog:\t"
|
||||
echo "\n$(date)\n" >> $logfile
|
||||
"$unshare" -m -- $exec daemon $other_args >> $logfile 2>&1 &
|
||||
"$unshare" -m -- $exec $other_args >> $logfile 2>&1 &
|
||||
pid=$!
|
||||
touch $lockfile
|
||||
# wait up to 10 seconds for the pidfile to exist. see
|
||||
|
|
|
@ -34,12 +34,12 @@ end script
|
|||
|
||||
script
|
||||
# modify these in /etc/default/$UPSTART_JOB (/etc/default/docker)
|
||||
DOCKER=/usr/bin/$UPSTART_JOB
|
||||
DOCKERD=/usr/bin/dockerd
|
||||
DOCKER_OPTS=
|
||||
if [ -f /etc/default/$UPSTART_JOB ]; then
|
||||
. /etc/default/$UPSTART_JOB
|
||||
fi
|
||||
exec "$DOCKER" daemon $DOCKER_OPTS --raw-logs
|
||||
exec "$DOCKERD" $DOCKER_OPTS --raw-logs
|
||||
end script
|
||||
|
||||
# Don't emit "started" event until docker.sock is ready.
|
||||
|
|
Loading…
Reference in a new issue