From 6b44c05205a89e3208cd3a962d06641c7d52e512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Hock=20Isaza?= Date: Fri, 10 Jul 2015 15:29:07 -0600 Subject: [PATCH] Adding information about ExecStart configuration for systemsd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #14491 Signed-off-by: Nicolás Hock Isaza --- docs/articles/systemd.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/articles/systemd.md b/docs/articles/systemd.md index 919ad50daa..a1b65a34ab 100644 --- a/docs/articles/systemd.md +++ b/docs/articles/systemd.md @@ -51,7 +51,7 @@ property: EnvironmentFile=-/etc/sysconfig/docker You can customize the Docker daemon options using override files as explained in the -[HTTP Proxy example](#http-proxy) below. The files located in `/usr/lib/systemd/system` +[HTTP Proxy example](#http-proxy) below. The files located in `/usr/lib/systemd/system` or `/lib/systemd/system` contain the default options and should not be edited. ### Runtime directory and storage driver @@ -85,6 +85,17 @@ setting `OPTIONS`: You can also set other environment variables in this file, for example, the `HTTP_PROXY` environment variables described below. +To modify the ExecStart configuration, specify an empty configuration followed +by a new configuration as follows: + + [Service] + ExecStart= + ExecStart=/usr/bin/docker -d -H fd:// --bip=172.17.42.1/16 + +If you fail to specify an empty configuration, Docker reports an error such as: + + docker.service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing. + ### HTTP proxy This example overrides the default `docker.service` file. @@ -127,5 +138,3 @@ to integrate Docker with systemd. For this, simply install the two unit files (service and socket) from [the github repository](https://github.com/docker/docker/tree/master/contrib/init/systemd) to `/etc/systemd/system`. - -