From be5df7c46bb7221fdaa67019e8c037a497db987b Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 20 Sep 2018 10:05:03 -0700 Subject: [PATCH] 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.