mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #24804 from crosbymichael/rpm-socket
Remove docker.socket from rpm based systems
This commit is contained in:
commit
39327a67e8
3 changed files with 34 additions and 7 deletions
29
contrib/init/systemd/docker.service.rpm
Normal file
29
contrib/init/systemd/docker.service.rpm
Normal file
|
@ -0,0 +1,29 @@
|
|||
[Unit]
|
||||
Description=Docker Application Container Engine
|
||||
Documentation=https://docs.docker.com
|
||||
After=network.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
|
||||
ExecReload=/bin/kill -s HUP $MAINPID
|
||||
# Having non-zero Limit*s causes performance problems due to accounting overhead
|
||||
# in the kernel. We recommend using cgroups to do container-local accounting.
|
||||
LimitNOFILE=infinity
|
||||
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
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -60,9 +60,9 @@ There are two ways to install Docker Engine. You can install with the `dnf` pac
|
|||
|
||||
$ sudo dnf install docker-engine
|
||||
|
||||
5. Enable the socket and service.
|
||||
5. Enable the service.
|
||||
|
||||
$ sudo systemctl enable docker.socket docker.service
|
||||
$ sudo systemctl enable docker.service
|
||||
|
||||
6. Start the Docker daemon.
|
||||
|
||||
|
@ -113,9 +113,9 @@ There are two ways to install Docker Engine. You can install with the `dnf` pac
|
|||
|
||||
This script adds the `docker.repo` repository and installs Docker.
|
||||
|
||||
4. Enable the socket and service.
|
||||
4. Enable the service.
|
||||
|
||||
$ sudo systemctl enable docker.socket docker.service
|
||||
$ sudo systemctl enable docker.service
|
||||
|
||||
5. Start the Docker daemon.
|
||||
|
||||
|
|
|
@ -147,8 +147,7 @@ install -d $RPM_BUILD_ROOT/%{_initddir}
|
|||
|
||||
%if 0%{?is_systemd}
|
||||
install -d $RPM_BUILD_ROOT/%{_unitdir}
|
||||
install -p -m 644 contrib/init/systemd/docker.service $RPM_BUILD_ROOT/%{_unitdir}/docker.service
|
||||
install -p -m 644 contrib/init/systemd/docker.socket $RPM_BUILD_ROOT/%{_unitdir}/docker.socket
|
||||
install -p -m 644 contrib/init/systemd/docker.service.rpm $RPM_BUILD_ROOT/%{_unitdir}/docker.service
|
||||
%else
|
||||
install -p -m 644 contrib/init/sysvinit-redhat/docker.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/docker
|
||||
install -p -m 755 contrib/init/sysvinit-redhat/docker $RPM_BUILD_ROOT/%{_initddir}/docker
|
||||
|
@ -194,7 +193,6 @@ install -p -m 644 contrib/syntax/nano/Dockerfile.nanorc $RPM_BUILD_ROOT/usr/shar
|
|||
/%{_sysconfdir}/udev/rules.d/80-docker.rules
|
||||
%if 0%{?is_systemd}
|
||||
/%{_unitdir}/docker.service
|
||||
/%{_unitdir}/docker.socket
|
||||
%else
|
||||
%config(noreplace,missingok) /etc/sysconfig/docker
|
||||
/%{_initddir}/docker
|
||||
|
|
Loading…
Add table
Reference in a new issue