Browse code

reflect changes introduced in d2ffcd9 in docs

Docker-DCO-1.1-Signed-off-by: Brice Jaglin <bjaglin@teads.tv> (github: bjaglin)

Brice Jaglin authored on 2014/10/10 15:12:12
Showing 1 changed files
... ...
@@ -151,12 +151,13 @@ earlier. The `--link` flag takes the form:
151 151
 Where `name` is the name of the container we're linking to and `alias` is an
152 152
 alias for the link name. You'll see how that alias gets used shortly.
153 153
 
154
-Next, look at your linked containers using `docker ps`.
154
+Next, look at the names of your linked containers by filtering the full output of
155
+`docker ps` to the last column (NAMES) using `docker ps --no-trunc | awk '{print $NF}'`.
155 156
 
156
-    $ sudo docker ps
157
-    CONTAINER ID  IMAGE                     COMMAND               CREATED             STATUS             PORTS                    NAMES
158
-    349169744e49  training/postgres:latest  su postgres -c '/usr  About a minute ago  Up About a minute  5432/tcp                 db, web/db
159
-    aed84ee21bde  training/webapp:latest    python app.py         16 hours ago        Up 2 minutes       0.0.0.0:49154->5000/tcp  web
157
+    $ sudo docker ps --no-trunc | awk '{print $NF}'
158
+    NAMES
159
+    db, web/db
160
+    web
160 161
 
161 162
 You can see your named containers, `db` and `web`, and you can see that the `db`
162 163
 container also shows `web/db` in the `NAMES` column. This tells you that the