mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
tweak the prose a little
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
parent
8c19e43dff
commit
814916457b
1 changed files with 6 additions and 5 deletions
|
@ -69,17 +69,18 @@ a new service that will be started after the docker daemon service has started.
|
|||
[Service]
|
||||
Restart=always
|
||||
ExecStart=/usr/bin/docker start -a redis_server
|
||||
# for more options, use 'run' instead of 'start', but not suggested
|
||||
# ExecStart=/usr/bin/docker run redis_server
|
||||
ExecStop=/usr/bin/docker stop -t 2 redis_server
|
||||
|
||||
[Install]
|
||||
WantedBy=local.target
|
||||
|
||||
if you need to pass options to the redis container (such as '--env'),
|
||||
then you'll need to use 'docker run' rather than 'docker start'.
|
||||
If you need to pass options to the redis container (such as `--env`),
|
||||
then you'll need to use `docker run` rather than `docker start`. This will
|
||||
create a new container every time the service is started, which will be stopped
|
||||
and removed when the service is stopped.
|
||||
|
||||
[Service]
|
||||
...
|
||||
ExecStart=/usr/bin/docker run --env foo=bar redis_server
|
||||
ExecStart=/usr/bin/docker run --env foo=bar --name redis_server redis
|
||||
ExecStop=/usr/bin/docker stop -t 2 redis_server ; /usr/bin/docker rm -f redis_server
|
||||
...
|
||||
|
|
Loading…
Add table
Reference in a new issue