41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
|
From 863e370fa7b6abffe839ba405b72f409116ad677 Mon Sep 17 00:00:00 2001
|
||
|
From: Jamie Anderson <jamieand@amazon.com>
|
||
|
Date: Wed, 10 Mar 2021 19:25:02 +0000
|
||
|
Subject: [PATCH] Support the use of sysconfig envvars in unit
|
||
|
|
||
|
Reworked for 20.10.4
|
||
|
Original patch message:
|
||
|
From: Jacob Vallejo <jakeev@amazon.com>
|
||
|
Date: Mon, 23 Sep 2019 15:55:53 -0700
|
||
|
Subject: [PATCH] Support the use of sysconfig envvars in unit
|
||
|
|
||
|
Environment variables may be conventionally configured here and are
|
||
|
wired up into the startup of docker if they are provided.
|
||
|
|
||
|
Signed-off-by: Jamie Anderson <jamieand@amazon.com>
|
||
|
---
|
||
|
contrib/init/systemd/docker.service | 4 +++-
|
||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/contrib/init/systemd/docker.service b/contrib/init/systemd/docker.service
|
||
|
index 5174631..a92685e 100644
|
||
|
--- a/contrib/init/systemd/docker.service
|
||
|
+++ b/contrib/init/systemd/docker.service
|
||
|
@@ -7,10 +7,12 @@ Requires=docker.socket
|
||
|
|
||
|
[Service]
|
||
|
Type=notify
|
||
|
+EnvironmentFile=-/etc/sysconfig/docker
|
||
|
+EnvironmentFile=-/etc/sysconfig/docker-storage
|
||
|
# 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://
|
||
|
+ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock $OPTIONS $DOCKER_STORAGE_OPTIONS
|
||
|
ExecReload=/bin/kill -s HUP $MAINPID
|
||
|
LimitNOFILE=1048576
|
||
|
# Having non-zero Limit*s causes performance problems due to accounting overhead
|
||
|
--
|
||
|
2.31.0.rc2
|
||
|
|