Make command line prompts consistent for both host and container shells.
Signed-off-by: Alan Thompson <cloojure@gmail.com>
| ... | ... |
@@ -46,7 +46,7 @@ by default. You can see this bridge as part of a host's network stack by using |
| 46 | 46 |
the `ifconfig` command on the host. |
| 47 | 47 |
|
| 48 | 48 |
``` |
| 49 |
-ubuntu@ip-172-31-36-118:~$ ifconfig |
|
| 49 |
+$ ifconfig |
|
| 50 | 50 |
docker0 Link encap:Ethernet HWaddr 02:42:47:bc:3a:eb |
| 51 | 51 |
inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0 |
| 52 | 52 |
inet6 addr: fe80::42:47ff:febc:3aeb/64 Scope:Link |
| ... | ... |
@@ -60,16 +60,16 @@ docker0 Link encap:Ethernet HWaddr 02:42:47:bc:3a:eb |
| 60 | 60 |
The `none` network adds a container to a container-specific network stack. That container lacks a network interface. Attaching to such a container and looking at it's stack you see this: |
| 61 | 61 |
|
| 62 | 62 |
``` |
| 63 |
-ubuntu@ip-172-31-36-118:~$ docker attach nonenetcontainer |
|
| 63 |
+$ docker attach nonenetcontainer |
|
| 64 | 64 |
|
| 65 |
-/ # cat /etc/hosts |
|
| 65 |
+root@0cb243cd1293:/# cat /etc/hosts |
|
| 66 | 66 |
127.0.0.1 localhost |
| 67 | 67 |
::1 localhost ip6-localhost ip6-loopback |
| 68 | 68 |
fe00::0 ip6-localnet |
| 69 | 69 |
ff00::0 ip6-mcastprefix |
| 70 | 70 |
ff02::1 ip6-allnodes |
| 71 | 71 |
ff02::2 ip6-allrouters |
| 72 |
-/ # ifconfig |
|
| 72 |
+root@0cb243cd1293:/# ifconfig |
|
| 73 | 73 |
lo Link encap:Local Loopback |
| 74 | 74 |
inet addr:127.0.0.1 Mask:255.0.0.0 |
| 75 | 75 |
inet6 addr: ::1/128 Scope:Host |
| ... | ... |
@@ -79,7 +79,7 @@ lo Link encap:Local Loopback |
| 79 | 79 |
collisions:0 txqueuelen:0 |
| 80 | 80 |
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
| 81 | 81 |
|
| 82 |
-/ # |
|
| 82 |
+root@0cb243cd1293:/# |
|
| 83 | 83 |
``` |
| 84 | 84 |
>**Note**: You can detach from the container and leave it running with `CTRL-p CTRL-q`. |
| 85 | 85 |
|
| ... | ... |
@@ -190,7 +190,7 @@ You can `attach` to a running `container` and investigate its configuration: |
| 190 | 190 |
``` |
| 191 | 191 |
$ docker attach container1 |
| 192 | 192 |
|
| 193 |
-/ # ifconfig |
|
| 193 |
+root@0cb243cd1293:/# ifconfig |
|
| 194 | 194 |
ifconfig |
| 195 | 195 |
eth0 Link encap:Ethernet HWaddr 02:42:AC:11:00:02 |
| 196 | 196 |
inet addr:172.17.0.2 Bcast:0.0.0.0 Mask:255.255.0.0 |
| ... | ... |
@@ -214,7 +214,7 @@ lo Link encap:Local Loopback |
| 214 | 214 |
Then use `ping` for about 3 seconds to test the connectivity of the containers on this `bridge` network. |
| 215 | 215 |
|
| 216 | 216 |
``` |
| 217 |
-/ # ping -w3 172.17.0.3 |
|
| 217 |
+root@0cb243cd1293:/# ping -w3 172.17.0.3 |
|
| 218 | 218 |
PING 172.17.0.3 (172.17.0.3): 56 data bytes |
| 219 | 219 |
64 bytes from 172.17.0.3: seq=0 ttl=64 time=0.096 ms |
| 220 | 220 |
64 bytes from 172.17.0.3: seq=1 ttl=64 time=0.080 ms |
| ... | ... |
@@ -228,7 +228,7 @@ round-trip min/avg/max = 0.074/0.083/0.096 ms |
| 228 | 228 |
Finally, use the `cat` command to check the `container1` network configuration: |
| 229 | 229 |
|
| 230 | 230 |
``` |
| 231 |
-/ # cat /etc/hosts |
|
| 231 |
+root@0cb243cd1293:/# cat /etc/hosts |
|
| 232 | 232 |
172.17.0.2 3386a527aa08 |
| 233 | 233 |
127.0.0.1 localhost |
| 234 | 234 |
::1 localhost ip6-localhost ip6-loopback |
| ... | ... |
@@ -242,7 +242,7 @@ To detach from a `container1` and leave it running use `CTRL-p CTRL-q`.Then, att |
| 242 | 242 |
``` |
| 243 | 243 |
$ docker attach container2 |
| 244 | 244 |
|
| 245 |
-/ # ifconfig |
|
| 245 |
+root@0cb243cd1293:/# ifconfig |
|
| 246 | 246 |
eth0 Link encap:Ethernet HWaddr 02:42:AC:11:00:03 |
| 247 | 247 |
inet addr:172.17.0.3 Bcast:0.0.0.0 Mask:255.255.0.0 |
| 248 | 248 |
inet6 addr: fe80::42:acff:fe11:3/64 Scope:Link |
| ... | ... |
@@ -261,7 +261,7 @@ lo Link encap:Local Loopback |
| 261 | 261 |
collisions:0 txqueuelen:0 |
| 262 | 262 |
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
| 263 | 263 |
|
| 264 |
-/ # ping -w3 172.17.0.2 |
|
| 264 |
+root@0cb243cd1293:/# ping -w3 172.17.0.2 |
|
| 265 | 265 |
PING 172.17.0.2 (172.17.0.2): 56 data bytes |
| 266 | 266 |
64 bytes from 172.17.0.2: seq=0 ttl=64 time=0.067 ms |
| 267 | 267 |
64 bytes from 172.17.0.2: seq=1 ttl=64 time=0.075 ms |