diff --git a/components/engine/docs/sources/examples/example_header.inc b/components/engine/docs/sources/examples/example_header.inc index 607421fc13..7d0feddeb9 100644 --- a/components/engine/docs/sources/examples/example_header.inc +++ b/components/engine/docs/sources/examples/example_header.inc @@ -2,3 +2,9 @@ .. note:: This example assumes you have Docker running in daemon mode. For more information please see :ref:`running_examples` + +.. note:: + + These examples use ``sudo`` before each ``docker`` command you could also + add your current ```` to docker's group and get rid of ``sudo``. + You just need to type: ``$ sudo usermod -a -G docker `` diff --git a/components/engine/docs/sources/examples/hello_world.rst b/components/engine/docs/sources/examples/hello_world.rst index 6d6c1b28a6..d6f75de09c 100644 --- a/components/engine/docs/sources/examples/hello_world.rst +++ b/components/engine/docs/sources/examples/hello_world.rst @@ -127,10 +127,11 @@ Check the logs make sure it is working correctly. sudo docker attach $CONTAINER_ID -Attach to the container to see the results in realtime. +Attach to the container to see the results in real-time. - **"docker attach**" This will allow us to attach to a background process to see what is going on. +- **"-sig-proxy=true" Proxify all received signal to the process (even in non-tty mode) - **$CONTAINER_ID** The Id of the container we want to attach too. Exit from the container attachment by pressing Control-C. diff --git a/components/engine/docs/sources/examples/python_web_app.rst b/components/engine/docs/sources/examples/python_web_app.rst index e3f5f5eb83..3034bf980a 100644 --- a/components/engine/docs/sources/examples/python_web_app.rst +++ b/components/engine/docs/sources/examples/python_web_app.rst @@ -39,11 +39,12 @@ container. The ``BUILD_JOB`` environment variable will be set with the new conta .. code-block:: bash - sudo docker attach $BUILD_JOB + sudo docker attach -sig-proxy=false $BUILD_JOB [...] While this container is running, we can attach to the new container to -see what is going on. You can use Ctrl-C to disconnect. +see what is going on. The flag ``-sig-proxy`` set as ``false`` allows you to connect and +disconnect (Ctrl-C) to it without stopping the container. .. code-block:: bash diff --git a/components/engine/docs/sources/use/basics.rst b/components/engine/docs/sources/use/basics.rst index 4cc43a1f29..30444c4f81 100644 --- a/components/engine/docs/sources/use/basics.rst +++ b/components/engine/docs/sources/use/basics.rst @@ -68,6 +68,13 @@ the daemon starts. The ``docker`` daemon must always run as root, but if you run the ``docker`` client as a user in the *docker* group then you don't need to add ``sudo`` to all the client commands. +Alternative to ``sudo``? +------------- + +You can add your current ```` to docker's group and get rid of +``sudo`` before each ``docker`` command. You just need to type: +``$ sudo usermod -a -G docker `` + .. code-block:: bash # Add the docker group