Simplify the upstart example in host_integration.rst
| ... | ... |
@@ -37,7 +37,7 @@ named ``/etc/init/redis.conf`` and place the following into it: |
| 37 | 37 |
|
| 38 | 38 |
description "Redis container" |
| 39 | 39 |
author "Me" |
| 40 |
- start on filesystem and started lxc-net and started docker |
|
| 40 |
+ start on filesystem and started docker |
|
| 41 | 41 |
stop on runlevel [!2345] |
| 42 | 42 |
respawn |
| 43 | 43 |
script |
| ... | ... |
@@ -49,23 +49,12 @@ named ``/etc/init/redis.conf`` and place the following into it: |
| 49 | 49 |
/usr/bin/docker start -a 0a7e070b698b |
| 50 | 50 |
end script |
| 51 | 51 |
|
| 52 |
-Next, we have to edit the docker upstart script (``/etc/init/docker.conf``) |
|
| 53 |
-so that we run docker with ``-r=false``. In this example, we also ensure |
|
| 54 |
-that docker will start running before *redis* is started. |
|
| 52 |
+Next, we have to configure docker so that it's run with the option ``-r=false``. |
|
| 53 |
+Run the following command: |
|
| 55 | 54 |
|
| 56 | 55 |
.. code-block:: bash |
| 57 | 56 |
|
| 58 |
- description "Docker daemon" |
|
| 59 |
- |
|
| 60 |
- start on filesystem and started lxc-net |
|
| 61 |
- start on (starting redis) |
|
| 62 |
- stop on runlevel [!2345] |
|
| 63 |
- |
|
| 64 |
- respawn |
|
| 65 |
- |
|
| 66 |
- script |
|
| 67 |
- /usr/bin/docker -d -r=false |
|
| 68 |
- end script |
|
| 57 |
+ $ sudo sh -c "echo 'DOCKER_OPTS=\"-r=false\"' > /etc/default/docker" |
|
| 69 | 58 |
|
| 70 | 59 |
|
| 71 | 60 |
Sample systemd Script |