1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

docs: note requirements for systemd drop-in filenames

the documentations says that you can drop "a file" into the
`docker.service.d` directory, but does not note that the file must end
with `.conf` in order to be recognized by systemd.  This can lead to
some [confusion][] if readers are not previously familiar with
systemd.

[confusion]: https://botbot.me/freenode/docker/2016-05-06/?msg=65605541&page=11

Signed-off-by: Lars Kellogg-Stedman <lars@redhat.com>
This commit is contained in:
Lars Kellogg-Stedman 2016-05-06 15:52:42 -04:00
parent b16fac959b
commit 987b03054a

View file

@ -33,15 +33,19 @@ If you want Docker to start at boot, you should also:
There are a number of ways to configure the daemon flags and environment variables There are a number of ways to configure the daemon flags and environment variables
for your Docker daemon. for your Docker daemon.
The recommended way is to use a systemd drop-in file. These are local files in The recommended way is to use a systemd drop-in file (as described in
the `/etc/systemd/system/docker.service.d` directory. This could also be the <a target="_blank"
`/etc/systemd/system/docker.service`, which also works for overriding the href="https://www.freedesktop.org/software/systemd/man/systemd.unit.html">systemd.unit</a>
defaults from `/lib/systemd/system/docker.service`. documentation). These are local files named `<something>.conf` in the
`/etc/systemd/system/docker.service.d` directory. This could also be
`/etc/systemd/system/docker.service`, which also works for overriding
the defaults from `/lib/systemd/system/docker.service`.
However, if you had previously used a package which had an `EnvironmentFile` However, if you had previously used a package which had an
(often pointing to `/etc/sysconfig/docker`) then for backwards compatibility, `EnvironmentFile` (often pointing to `/etc/sysconfig/docker`) then for
you drop a file in the `/etc/systemd/system/docker.service.d` backwards compatibility, you drop a file with a `.conf` extension into
directory including the following: the `/etc/systemd/system/docker.service.d` directory including the
following:
[Service] [Service]
EnvironmentFile=-/etc/sysconfig/docker EnvironmentFile=-/etc/sysconfig/docker