docker: fix 1.7 ebuild, --daemon was in the service, not script

Commit 897c35ff attempted to fix compatibility with 1.7 by copying an
older copy of the dockerd script but the script hadn't actually changed.
The incompatible change was in the service files. oops...

Only impacts arm64, amd64 uses 1.8
This commit is contained in:
Michael Marineau 2015-09-22 21:01:53 -07:00
parent 56829f3027
commit 42b38f98be
4 changed files with 33 additions and 70 deletions

View File

@ -216,11 +216,11 @@ src_install() {
newconfd contrib/init/openrc/docker.confd docker
exeinto /usr/lib/coreos
newexe "${FILESDIR}/dockerd-1.7" dockerd
doexe "${FILESDIR}/dockerd"
systemd_dounit "${FILESDIR}/docker.service"
systemd_newunit "${FILESDIR}/docker.service-1.7" docker.service
systemd_dounit "${FILESDIR}/docker.socket"
systemd_dounit "${FILESDIR}/early-docker.service"
systemd_newunit "${FILESDIR}/early-docker.service-1.7" early-docker.service
systemd_dounit "${FILESDIR}/early-docker.socket"
systemd_dounit "${FILESDIR}/early-docker.target"

View File

@ -0,0 +1,15 @@
[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com
After=docker.socket early-docker.target network.target
Requires=docker.socket early-docker.target
[Service]
EnvironmentFile=-/run/flannel_docker_opts.env
MountFlags=slave
LimitNOFILE=1048576
LimitNPROC=1048576
ExecStart=/usr/lib/coreos/dockerd --daemon --host=fd:// $DOCKER_OPTS $DOCKER_OPT_BIP $DOCKER_OPT_MTU $DOCKER_OPT_IPMASQ
[Install]
WantedBy=multi-user.target

View File

@ -1,67 +0,0 @@
#!/bin/bash
# Wrapper for launching docker daemons with an appropriate backend.
set -e
parse_docker_args() {
local flag
while [[ $# -gt 0 ]]; do
flag="$1"
shift
# treat --flag=foo and --flag foo identically
if [[ "${flag}" == *=* ]]; then
set -- "${flag#*=}" "$@"
flag="${flag%=*}"
fi
case "${flag}" in
-g|--graph)
ARG_ROOT="$1"
shift
;;
-s|--storage-driver)
ARG_DRIVER="$1"
shift
;;
*)
# ignore everything else
;;
esac
done
}
select_docker_driver() {
local fstype
# mimic docker's behavior to ensure we stat the right filesystem.
if [[ -L "${ARG_ROOT}" ]]; then
ARG_ROOT="$(readlink -f "${ARG_ROOT}")"
fi
mkdir --parents --mode=0700 "${ARG_ROOT}"
fstype=$(findmnt --noheadings --output FSTYPE --target "${ARG_ROOT}")
case "${fstype}" in
btrfs)
export DOCKER_DRIVER=btrfs
;;
ext4|tmpfs) # As of 3.18
export DOCKER_DRIVER=overlay
;;
*)
# Fall back to whatever docker's default behavior is.
;;
esac
}
ARG_ROOT="/var/lib/docker"
ARG_DRIVER=""
parse_docker_args "$@"
# Do not override the driver if it is already explicitly configured.
if [[ -z "${ARG_DRIVER}" && -z "${DOCKER_DRIVER}" ]]; then
select_docker_driver
fi
exec docker "$@"

View File

@ -0,0 +1,15 @@
[Unit]
Description=Early Docker Application Container Engine
Documentation=http://docs.docker.com
After=early-docker.socket
Requires=early-docker.socket
[Service]
Environment=TMPDIR=/var/tmp
MountFlags=slave
LimitNOFILE=1048576
LimitNPROC=1048576
ExecStart=/usr/lib/coreos/dockerd --daemon --host=fd:// --bridge=none --iptables=false --ip-masq=false --graph=/var/lib/early-docker --pidfile=/var/run/early-docker.pid
[Install]
WantedBy=early-docker.target