From be5df7c46bb7221fdaa67019e8c037a497db987b Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 20 Sep 2018 10:05:03 -0700 Subject: [PATCH 1/2] systemd/docker.service: fix PATH Set the PATH to what appears to be the standard on latest Ubuntu (18.04) and Debian (9), fixing the following two issues: 1. PATH did not contain /bin (leading to ContainerTop/ps not working on newer distros, among the other things). 2. $PATH can't be specified in Environment directives in .service files. Signed-off-by: Kir Kolyshkin Upstream-commit: 62d9a0d1253049a2fab10f938542a8e09dd0804a Component: packaging --- components/packaging/systemd/docker.service | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/packaging/systemd/docker.service b/components/packaging/systemd/docker.service index be1617069f..d8b2efebc7 100644 --- a/components/packaging/systemd/docker.service +++ b/components/packaging/systemd/docker.service @@ -26,9 +26,8 @@ StartLimitBurst=3 # this option work for either version of systemd. StartLimitInterval=60s -# On RPM Based distributions PATH isn't defined so we define it here # /opt/containerd/bin is in front so dockerd grabs the correct runc binary -Environment="PATH=/opt/containerd/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:$PATH" +Environment="PATH=/opt/containerd/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" # Having non-zero Limit*s causes performance problems due to accounting overhead # in the kernel. We recommend using cgroups to do container-local accounting. From 49de0c314f6dfda70337c03719b5e53581dd0272 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 20 Sep 2018 10:16:39 -0700 Subject: [PATCH 2/2] deb/systemd: remove These files are not used, and having them in repo is misleading. Signed-off-by: Kir Kolyshkin Upstream-commit: fca673ad8051d1b377435821ec6c76c0de24b663 Component: packaging --- .../packaging/deb/systemd/docker.service | 34 ------------------- .../packaging/deb/systemd/docker.socket | 12 ------- 2 files changed, 46 deletions(-) delete mode 100644 components/packaging/deb/systemd/docker.service delete mode 100644 components/packaging/deb/systemd/docker.socket diff --git a/components/packaging/deb/systemd/docker.service b/components/packaging/deb/systemd/docker.service deleted file mode 100644 index 517463172b..0000000000 --- a/components/packaging/deb/systemd/docker.service +++ /dev/null @@ -1,34 +0,0 @@ -[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 diff --git a/components/packaging/deb/systemd/docker.socket b/components/packaging/deb/systemd/docker.socket deleted file mode 100644 index 7dd95098e4..0000000000 --- a/components/packaging/deb/systemd/docker.socket +++ /dev/null @@ -1,12 +0,0 @@ -[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