Merge pull request #13 from seemethere/add_systemd_files

Add systemd scripts
Upstream-commit: 9c1135df05c6ae371da5879d8a1be88749a2bfbd
Component: packaging
This commit is contained in:
Andrew Hsu
2017-06-15 01:02:43 -07:00
committed by GitHub
10 changed files with 99 additions and 8 deletions
+7
View File
@@ -31,6 +31,7 @@ ubuntu-xenial: ## build ubuntu xenial deb packages
-v $(CURDIR)/debbuild/$@:/build \
-v $(ENGINE_DIR):/engine \
-v $(CLI_DIR):/cli \
-v $(CURDIR)/systemd:/root/build-deb/systemd \
debbuild-$@/$(ARCH)
$(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@
@@ -42,6 +43,7 @@ ubuntu-trusty: ## build ubuntu trusty deb packages
-v $(CURDIR)/debbuild/$@:/build \
-v $(ENGINE_DIR):/engine \
-v $(CLI_DIR):/cli \
-v $(CURDIR)/systemd:/root/build-deb/systemd \
debbuild-$@/$(ARCH)
$(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@
@@ -53,6 +55,7 @@ ubuntu-yakkety: ## build ubuntu yakkety deb packages
-v $(CURDIR)/debbuild/$@:/build \
-v $(ENGINE_DIR):/engine \
-v $(CLI_DIR):/cli \
-v $(CURDIR)/systemd:/root/build-deb/systemd \
debbuild-$@/$(ARCH)
$(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@
@@ -64,6 +67,7 @@ ubuntu-zesty: ## build ubuntu zesty deb packages
-v $(CURDIR)/debbuild/$@:/build \
-v $(ENGINE_DIR):/engine \
-v $(CLI_DIR):/cli \
-v $(CURDIR)/systemd:/root/build-deb/systemd \
debbuild-$@/$(ARCH)
$(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@
@@ -75,6 +79,7 @@ debian-jessie: ## build debian jessie deb packages
-v $(CURDIR)/debbuild/$@:/build \
-v $(ENGINE_DIR):/engine \
-v $(CLI_DIR):/cli \
-v $(CURDIR)/systemd:/root/build-deb/systemd \
debbuild-$@/$(ARCH)
$(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@
@@ -86,6 +91,7 @@ debian-stretch: ## build debian stretch deb packages
-v $(CURDIR)/debbuild/$@:/build \
-v $(ENGINE_DIR):/engine \
-v $(CLI_DIR):/cli \
-v $(CURDIR)/systemd:/root/build-deb/systemd \
debbuild-$@/$(ARCH)
$(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@
@@ -97,5 +103,6 @@ debian-wheezy: ## build debian wheezy deb packages
-v $(CURDIR)/debbuild/$@:/build \
-v $(ENGINE_DIR):/engine \
-v $(CLI_DIR):/cli \
-v $(CURDIR)/systemd:/root/build-deb/systemd \
debbuild-$@/$(ARCH)
$(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@
@@ -5,8 +5,8 @@ engine/contrib/*-integration usr/share/docker-ce/contrib/
engine/contrib/check-config.sh usr/share/docker-ce/contrib/
engine/contrib/completion/fish/docker.fish usr/share/fish/vendor_completions.d/
engine/contrib/completion/zsh/_docker usr/share/zsh/vendor-completions/
engine/contrib/init/systemd/docker.service lib/systemd/system/
engine/contrib/init/systemd/docker.socket lib/systemd/system/
systemd/docker.service lib/systemd/system/
systemd/docker.socket lib/systemd/system/
engine/contrib/mk* usr/share/docker-ce/contrib/
engine/contrib/nuke-graph-directory.sh usr/share/docker-ce/contrib/
engine/contrib/syntax/nano/Dockerfile.nanorc usr/share/nano/
@@ -0,0 +1,34 @@
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target docker.socket firewalld.service
Wants=network-online.target
Requires=docker.socket
[Service]
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/dockerd -H fd://
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
@@ -0,0 +1,12 @@
[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