[Lunar-commits] <moonbase-other> docker: tweak systemd services

Stefan Wold ratler at lunar-linux.org
Sun Oct 26 17:26:18 CET 2014


commit 1138dcbfa451de5afd4fb89523d69543babb66c2
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Sun, 26 Oct 2014 17:26:08 +0100
URL: https://github.com/lunar-linux/moonbase-other/commit/1138dcbfa451de5afd4fb89523d69543babb66c2

docker: tweak systemd services
---
  virtual/docker/BUILD                    | +3/-0     
  virtual/docker/systemd.d/docker.service | +4/-3     
  virtual/docker/systemd.d/docker.socket  | +12/-0    
  3 files changed, 19 insertions(+), 3 deletions(-)

--- a/virtual/docker/BUILD
+++ b/virtual/docker/BUILD
@@ -1,5 +1,8 @@
 export AUTO_GOPATH=1
 export DOCKER_GITCOMMIT
+
+add_priv_group docker &&
+
 ./hack/make.sh dynbinary &&
 prepare_install &&
 install -Dm0755 bundles/${VERSION}/dynbinary/docker-${VERSION} /usr/bin/docker &&
--- a/virtual/docker/systemd.d/docker.service
+++ b/virtual/docker/systemd.d/docker.service
@@ -1,11 +1,12 @@
 [Unit]
 Description=Docker Application Container Engine
-Documentation=http://docs.docker.io
-After=network.target
+Documentation=http://docs.docker.com
+After=network.target docker.socket
+Requires=docker.socket
 
 [Service]
-ExecStart=/usr/bin/docker -d
 Restart=on-failure
+ExecStart=/usr/bin/docker -d -H fd://
 LimitNOFILE=1048576
 LimitNPROC=1048576
 
--- /dev/null
+++ b/virtual/docker/systemd.d/docker.socket
@@ -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




More information about the Lunar-commits mailing list