[packages/docker] - fix systemd unit - rel 2

jareq jareq at pld-linux.org
Sun Aug 7 10:32:09 CEST 2016


commit 5fcaa458a6b29571c65cb8fca6ae64b9f93f2af1
Author: Jaroslaw Kruk <kruk.jaroslaw at gmail.com>
Date:   Sun Aug 7 10:31:07 2016 +0200

    - fix systemd unit
    - rel 2

 docker.service | 18 ++++++++++++------
 docker.socket  | 12 ++++++++++++
 docker.spec    | 13 ++++++++-----
 3 files changed, 32 insertions(+), 11 deletions(-)
---
diff --git a/docker.spec b/docker.spec
index 016d6b6..7922991 100644
--- a/docker.spec
+++ b/docker.spec
@@ -14,7 +14,7 @@
 Summary:	Docker: the open-source application container engine
 Name:		docker
 Version:	1.12.0
-Release:	1
+Release:	2
 License:	Apache v2.0
 Group:		Applications/System
 Source0:	https://github.com/docker/docker/archive/v%{version}/%{name}-%{version}.tar.gz
@@ -25,8 +25,9 @@ Source2:	https://github.com/docker/containerd/archive/%{containerd_commit}/conta
 # Source2-md5:	f0a0c1101ad259b84fb457c8c7036723
 Source4:	%{name}.sh
 Source5:	%{name}.service
-Source6:	%{name}.init
-Source7:	%{name}.sysconfig
+Source6:	%{name}.socket
+Source7:	%{name}.init
+Source8:	%{name}.sysconfig
 URL:		http://www.docker.com/
 BuildRequires:	btrfs-progs-devel >= 3.16.1
 BuildRequires:	device-mapper-devel >= 2.02.89
@@ -159,9 +160,10 @@ install -p containerd/bin/containerd-shim $RPM_BUILD_ROOT%{_sbindir}/docker-cont
 install -p containerd/bin/ctr $RPM_BUILD_ROOT%{_sbindir}/docker-containerd-ctr
 
 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}
-install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/docker
+cp -p %{SOURCE6} $RPM_BUILD_ROOT%{systemdunitdir}
+install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/docker
 install -p %{SOURCE4} $RPM_BUILD_ROOT%{_libexecdir}/docker
-cp -p %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/docker
+cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/docker
 
 # install udev rules
 install -d $RPM_BUILD_ROOT/lib/udev/rules.d
@@ -213,6 +215,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_sbindir}/dockerd
 %attr(755,root,root) %{_libexecdir}/docker
 %{systemdunitdir}/docker.service
+%{systemdunitdir}/docker.socket
 /lib/udev/rules.d/80-docker.rules
 
 %dir %attr(700,root,root) /var/lib/docker
diff --git a/docker.service b/docker.service
index 42ce05d..db6bf1f 100644
--- a/docker.service
+++ b/docker.service
@@ -1,13 +1,19 @@
 [Unit]
 Description=Docker Application Container Engine
-Documentation=http://docs.docker.io
-Requires=network.target
-After=syslog.target network.target remote-fs.target nss-lookup.target
+Documentation=https://docs.docker.com
+After=network.target docker.socket
+Requires=docker.socket
 
 [Service]
-Type=simple
-ExecStartPre=/bin/mount --make-rprivate /
-ExecStart=/usr/bin/docker -d
+Type=notify
+ExecStart=/usr/sbin/dockerd -H fd://
+ExecReload=/bin/kill -s HUP $MAINPID
+LimitNOFILE=infinity
+LimitNPROC=infinity
+LimitCORE=infinity
+TimeoutStartSec=0
+Delegate=yes
+KillMode=process
 
 [Install]
 WantedBy=multi-user.target
diff --git a/docker.socket b/docker.socket
new file mode 100644
index 0000000..7dd9509
--- /dev/null
+++ b/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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/docker.git/commitdiff/5fcaa458a6b29571c65cb8fca6ae64b9f93f2af1



More information about the pld-cvs-commit mailing list