From 76ee860ece15f8a7738c503fdd73f124f0ef1f4b Mon Sep 17 00:00:00 2001 From: Ryan Seto Date: Mon, 18 Nov 2013 16:21:03 -0500 Subject: [PATCH 1/3] Simplify the upstart example in host_integration.rst Taking some pointers from @tianon on my pull request #2685. --- docs/sources/use/host_integration.rst | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/docs/sources/use/host_integration.rst b/docs/sources/use/host_integration.rst index b51b2efcf..bef996a71 100644 --- a/docs/sources/use/host_integration.rst +++ b/docs/sources/use/host_integration.rst @@ -37,7 +37,7 @@ named ``/etc/init/redis.conf`` and place the following into it: description "Redis container" author "Me" - start on filesystem and started lxc-net and started docker + start on filesystem and started docker stop on runlevel [!2345] respawn script @@ -49,23 +49,12 @@ named ``/etc/init/redis.conf`` and place the following into it: /usr/bin/docker start -a 0a7e070b698b end script -Next, we have to edit the docker upstart script (``/etc/init/docker.conf``) -so that we run docker with ``-r=false``. In this example, we also ensure -that docker will start running before *redis* is started. +Next, we have to configure docker so that it's run with the option ``-r=false``. +Run the following command: .. code-block:: bash - description "Docker daemon" - - start on filesystem and started lxc-net - start on (starting redis) - stop on runlevel [!2345] - - respawn - - script - /usr/bin/docker -d -r=false - end script + $ sudo sh -c 'echo DOCKER_OPTS="-r=false" > /etc/default/docker' Sample systemd Script From 194d4b93768c49f0d76a5da8943446efbea879ca Mon Sep 17 00:00:00 2001 From: Ryan Seto Date: Mon, 18 Nov 2013 21:23:00 -0500 Subject: [PATCH 2/3] Correct the quotations in the command to add the -r=false flag. Thanks to @tianon for pointing this out. --- docs/sources/use/host_integration.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/use/host_integration.rst b/docs/sources/use/host_integration.rst index bef996a71..4c705a1c0 100644 --- a/docs/sources/use/host_integration.rst +++ b/docs/sources/use/host_integration.rst @@ -54,7 +54,7 @@ Run the following command: .. code-block:: bash - $ sudo sh -c 'echo DOCKER_OPTS="-r=false" > /etc/default/docker' + $ sudo sh -c "echo DOCKER_OPTS=\"-r=false\" > /etc/default/docker" Sample systemd Script From 1da8c50deddde692c1f87aec86c20cd3c2c3fd11 Mon Sep 17 00:00:00 2001 From: Ryan Seto Date: Tue, 19 Nov 2013 12:14:39 -0500 Subject: [PATCH 3/3] Fix quote mistake. --- docs/sources/use/host_integration.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/use/host_integration.rst b/docs/sources/use/host_integration.rst index 4c705a1c0..a9f9c1e75 100644 --- a/docs/sources/use/host_integration.rst +++ b/docs/sources/use/host_integration.rst @@ -54,7 +54,7 @@ Run the following command: .. code-block:: bash - $ sudo sh -c "echo DOCKER_OPTS=\"-r=false\" > /etc/default/docker" + $ sudo sh -c "echo 'DOCKER_OPTS=\"-r=false\"' > /etc/default/docker" Sample systemd Script