#1 Additional configuration
Merged 5 years ago by dm0. Opened 5 years ago by mskarbek.
rpms/ mskarbek/moby-engine master  into  master

file added
+36
@@ -0,0 +1,36 @@ 

+ [Unit]

+ Description=Docker Application Container Engine

+ Documentation=https://docs.docker.com

+ After=network-online.target firewalld.service

+ Wants=network-online.target

+ 

+ [Service]

+ Type=notify

+ EnvironmentFile=-/etc/sysconfig/docker

+ # 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 \

+           --exec-opt native.cgroupdriver=systemd \

+           $OPTIONS

+ 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

+ # restart the docker process if it exits prematurely

+ Restart=on-failure

+ StartLimitBurst=3

+ StartLimitInterval=60s

+ 

+ [Install]

+ WantedBy=multi-user.target

file added
+4
@@ -0,0 +1,4 @@ 

+ # /etc/sysconfig/docker

+ 

+ # Modify these options if you want to change the way the docker daemon runs

+ OPTIONS='--selinux-enabled --log-driver=journald --live-restore'

file modified
+14 -3
@@ -40,7 +40,7 @@ 

  

  Name: %{newname}-engine

  Version: 18.06.0

- Release: 1.ce.git%{shortcommit_moby}%{?dist}

+ Release: 2.ce.git%{shortcommit_moby}%{?dist}

  Summary: The open-source application container engine

  License: ASL 2.0

  # no golang / go-md2man for ppc64
@@ -50,6 +50,8 @@ 

  Source2: %{git_containerd}/archive/%{commit_containerd}.tar.gz

  Source3: %{git_libnetwork}/archive/%{commit_libnetwork}.tar.gz

  Source4: %{git_tini}/archive/%{commit_tini}.tar.gz

+ Source5: %{service_name}.service

+ Source6: %{service_name}.sysconfig

  URL: https://www.%{origname}.com

  

  BuildRequires: btrfs-progs-devel
@@ -240,8 +242,12 @@ 

  install -p -m 644 components/engine/contrib/udev/80-%{service_name}.rules %{buildroot}%{_usr}/lib/udev/rules.d/80-%{service_name}.rules

  

  # add init scripts

- install -dp %{buildroot}/%{_unitdir}

- install -p -m 644 components/packaging/rpm/systemd/%{service_name}.service %{buildroot}%{_unitdir}

+ install -dp %{buildroot}%{_unitdir}

+ install -p -m 644 %{SOURCE5} %{buildroot}%{_unitdir}

+ 

+ # for additional args

+ install -dp %{buildroot}%{_sysconfdir}/sysconfig

+ install -p -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysconfig/%{service_name}

  

  # add bash, zsh, and fish completions

  install -dp %{buildroot}%{_datadir}/bash-completion/completions
@@ -286,6 +292,7 @@ 

  %license cli-LICENSE components/engine/LICENSE

  %doc components/engine/{AUTHORS,CHANGELOG.md,CONTRIBUTING.md,MAINTAINERS,NOTICE,README.md}

  %doc cli-MAINTAINERS cli-NOTICE cli-README.md

+ %config(noreplace) %{_sysconfdir}/sysconfig/%{service_name}

  %{_bindir}/%{service_name}

  %{_bindir}/%{service_name}d

  %dir %{_libexecdir}/%{service_name}/
@@ -321,6 +328,10 @@ 

  %{_datadir}/nano/Dockerfile.nanorc

  

  %changelog

+ * Mon Nov 12 2018 Marcin Skarbek <rpm@skarbek.name> - 18.06.0-2.ce.git0ffa825

+ - add configuration file

+ - update service file

+ 

  * Sat Aug 18 2018 Lokesh Mandvekar <lsm5@fedoraproject.org> - 18.06.0-1.ce.git0ffa825

  - Resolves: #1539161 - first upload to Fedora

  - built docker-ce commit 0ffa825

This PR adds configuration file in /etc/sysconfig/docker, modifies service file to include that configuration, sets logging and cgroup driver and enables SElinux.

Addidtional context: https://github.com/coreos/fedora-coreos-tracker/issues/76

LGTM, but I'll let @dm0 decide FWIW.

Pull-Request has been merged by dm0

5 years ago