-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
overlay app-emulation/docker: Apply Flatcar modifications
- Loading branch information
Showing
8 changed files
with
173 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
...eos-overlay/app-emulation/docker/files/0001-Openrc-Depend-on-containerd-init-script.patch
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/50-docker.network
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[Match] | ||
Type=bridge | ||
Name=docker* br-* | ||
|
||
[Link] | ||
Unmanaged=yes |
5 changes: 5 additions & 0 deletions
5
...ontainer/src/third_party/coreos-overlay/app-emulation/docker/files/90-docker-veth.network
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[Match] | ||
Driver=veth | ||
|
||
[Link] | ||
Unmanaged=yes |
37 changes: 37 additions & 0 deletions
37
sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/docker.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[Unit] | ||
Description=Docker Application Container Engine | ||
Documentation=http://docs.docker.com | ||
After=containerd.service docker.socket network-online.target | ||
Wants=network-online.target | ||
Requires=containerd.service docker.socket | ||
|
||
[Service] | ||
Type=notify | ||
EnvironmentFile=-/run/flannel/flannel_docker_opts.env | ||
Environment=DOCKER_SELINUX=--selinux-enabled=true | ||
|
||
# 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/dockerd --host=fd:// --containerd=/var/run/docker/libcontainerd/docker-containerd.sock $DOCKER_SELINUX $DOCKER_OPTS $DOCKER_CGROUPS $DOCKER_OPT_BIP $DOCKER_OPT_MTU $DOCKER_OPT_IPMASQ | ||
ExecReload=/bin/kill -s HUP $MAINPID | ||
LimitNOFILE=1048576 | ||
# Having non-zero Limit*s causes performance problems due to accounting overhead | ||
# in the kernel. We recommend using cgroups to do container-local accounting. | ||
LimitNPROC=infinity | ||
LimitCORE=infinity | ||
# Uncomment TasksMax if your systemd version supports it. | ||
# Only systemd 226 and above support this version. | ||
TasksMax=infinity | ||
TimeoutStartSec=0 | ||
# set delegate yes so that systemd does not reset the cgroups of docker containers | ||
Delegate=yes | ||
# kill only the docker process, not all processes in the cgroup | ||
KillMode=process | ||
# restart the docker process if it exits prematurely | ||
Restart=on-failure | ||
StartLimitBurst=3 | ||
StartLimitInterval=60s | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
13 changes: 13 additions & 0 deletions
13
sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/docker.socket
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Unit] | ||
Description=Docker Socket for the API | ||
PartOf=docker.service | ||
|
||
[Socket] | ||
ListenStream=/var/run/docker.sock | ||
SocketMode=0660 | ||
SocketUser=root | ||
SocketGroup=docker | ||
|
||
[Install] | ||
WantedBy=sockets.target | ||
|
41 changes: 41 additions & 0 deletions
41
sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/dockerd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
# Wrapper for launching docker daemons with selinux default on | ||
# This wrapper script has been deprecated (euank: 2017-05-09) and is retained | ||
# for backwards compatibility. | ||
|
||
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 | ||
--selinux-enabled) | ||
ARG_SELINUX="$1" | ||
shift | ||
;; | ||
*) | ||
# ignore everything else | ||
;; | ||
esac | ||
done | ||
} | ||
|
||
parse_docker_args "$@" | ||
|
||
USE_SELINUX="" | ||
# Do not override selinux if it is already explicitly configured. | ||
if [[ -z "${ARG_SELINUX}" ]]; then | ||
# If unspecified, default off | ||
USE_SELINUX="--selinux-enabled=false" | ||
fi | ||
|
||
exec dockerd "$@" ${USE_SELINUX} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters