diff --git a/docs/sources/examples/hello_world.rst b/docs/sources/examples/hello_world.rst index 6d6c1b28a6..d6f75de09c 100644 --- a/docs/sources/examples/hello_world.rst +++ b/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/docs/sources/examples/python_web_app.rst b/docs/sources/examples/python_web_app.rst index c707fcdec6..71e7ae4e08 100644 --- a/docs/sources/examples/python_web_app.rst +++ b/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/docs/sources/examples/running_ssh_service.rst b/docs/sources/examples/running_ssh_service.rst index 59a80fbf6e..e0d406bc0e 100644 --- a/docs/sources/examples/running_ssh_service.rst +++ b/docs/sources/examples/running_ssh_service.rst @@ -21,7 +21,8 @@ smooth, but gives you a good idea. daemon is unprotected and available via a TCP port. When you run through the same steps in a newer version of Docker, you will need to add ``sudo`` in front of each ``docker`` command in order - to reach the daemon over its protected Unix socket. + to reach the daemon over its protected Unix socket or you can add + your user to docker's group: ``sudo usermod -a -G docker ``. .. raw:: html diff --git a/docs/sources/use/basics.rst b/docs/sources/use/basics.rst index 0097b6836d..8773fa9492 100644 --- a/docs/sources/use/basics.rst +++ b/docs/sources/use/basics.rst @@ -54,6 +54,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