Prechádzať zdrojové kódy

Merge branch 'fix_examples_use_docs' of git://github.com/rogaha/docker into test-2592

Andy Rothfusz 11 rokov pred
rodič
commit
33110ddc3f

+ 6 - 0
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 ``<username>`` to docker's group and get rid of ``sudo``.
+   You just need to type: ``$ sudo usermod -a -G docker <username>``

+ 2 - 1
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.

+ 3 - 2
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
 

+ 7 - 0
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 ``<username>`` to docker's group and get rid of
+``sudo`` before each ``docker`` command. You just need to type:
+``$ sudo usermod -a -G docker <username>``
+
 .. code-block:: bash
 
   # Add the docker group