mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-22 23:11:07 +02:00
Merge pull request #1571 from marineam/docker
docker: fix 1.7 ebuild, --daemon was in the service, not script
This commit is contained in:
commit
493b8bdfd0
@ -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"
|
||||
|
15
sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/docker.service-1.7
vendored
Normal file
15
sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/docker.service-1.7
vendored
Normal 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
|
@ -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 "$@"
|
15
sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/early-docker.service-1.7
vendored
Normal file
15
sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/early-docker.service-1.7
vendored
Normal 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
|
Loading…
x
Reference in New Issue
Block a user