Browse code

- Fix the attach examples according to the new attach behavior - Add the option of adding the user to docker's group and avoid the usage of "sudo" before each command

Roberto Gandolfo Hashioka authored on 2013/11/08 07:06:49
Showing 4 changed files
... ...
@@ -127,10 +127,11 @@ Check the logs make sure it is working correctly.
127 127
 
128 128
     sudo docker attach $CONTAINER_ID
129 129
 
130
-Attach to the container to see the results in realtime.
130
+Attach to the container to see the results in real-time.
131 131
 
132 132
 - **"docker attach**" This will allow us to attach to a background
133 133
   process to see what is going on.
134
+- **"-sig-proxy=true" Proxify all received signal to the process (even in non-tty mode)
134 135
 - **$CONTAINER_ID** The Id of the container we want to attach too.
135 136
 
136 137
 Exit from the container attachment by pressing Control-C.
... ...
@@ -39,11 +39,12 @@ container. The ``BUILD_JOB`` environment variable will be set with the new conta
39 39
 
40 40
 .. code-block:: bash
41 41
 
42
-    sudo docker attach $BUILD_JOB
42
+    sudo docker attach -sig-proxy=false $BUILD_JOB
43 43
     [...]
44 44
 
45 45
 While this container is running, we can attach to the new container to
46
-see what is going on. You can use Ctrl-C to disconnect.
46
+see what is going on. The flag ``-sig-proxy`` set as ``false`` allows you to connect and
47
+disconnect (Ctrl-C) to it without stopping the container.
47 48
 
48 49
 .. code-block:: bash
49 50
 
... ...
@@ -21,7 +21,8 @@ smooth, but gives you a good idea.
21 21
    daemon is unprotected and available via a TCP port. When you run
22 22
    through the same steps in a newer version of Docker, you will
23 23
    need to add ``sudo`` in front of each ``docker`` command in order
24
-   to reach the daemon over its protected Unix socket.
24
+   to reach the daemon over its protected Unix socket or you can add
25
+   your user to docker's group: ``sudo usermod -a -G docker <user>``.
25 26
 
26 27
 .. raw:: html
27 28
 
... ...
@@ -54,6 +54,13 @@ the daemon starts. The ``docker`` daemon must always run as root, but
54 54
 if you run the ``docker`` client as a user in the *docker* group then
55 55
 you don't need to add ``sudo`` to all the client commands.
56 56
 
57
+Alternative to ``sudo``?
58
+-------------
59
+
60
+You can add your current ``<username>`` to docker's group and get rid of
61
+``sudo`` before each ``docker`` command. You just need to type:
62
+``$ sudo usermod -a -G docker <username>``
63
+
57 64
 .. code-block:: bash
58 65
 
59 66
   # Add the docker group