| ... | ... |
@@ -89,7 +89,7 @@ Install your app dependencies using the `npm` binary: |
| 89 | 89 |
|
| 90 | 90 |
# Install app dependencies |
| 91 | 91 |
COPY package.json /src/package.json |
| 92 |
- RUN cd /src; npm install |
|
| 92 |
+ RUN cd /src; npm install --production |
|
| 93 | 93 |
|
| 94 | 94 |
To bundle your app's source code inside the Docker image, use the `COPY` |
| 95 | 95 |
instruction: |
| ... | ... |
@@ -119,7 +119,7 @@ Your `Dockerfile` should now look like this: |
| 119 | 119 |
|
| 120 | 120 |
# Install app dependencies |
| 121 | 121 |
COPY package.json /src/package.json |
| 122 |
- RUN cd /src; npm install |
|
| 122 |
+ RUN cd /src; npm install --production |
|
| 123 | 123 |
|
| 124 | 124 |
# Bundle app source |
| 125 | 125 |
COPY . /src |
| ... | ... |
@@ -32,7 +32,7 @@ display your kernel version: |
| 32 | 32 |
$ uname -r |
| 33 | 33 |
3.10.0-229.el7.x86_64 |
| 34 | 34 |
|
| 35 |
-Finally, is it recommended that you fully update your system. Please keep in |
|
| 35 |
+Finally, it is recommended that you fully update your system. Please keep in |
|
| 36 | 36 |
mind that your system should be fully patched to fix any potential kernel bugs. |
| 37 | 37 |
Any reported kernel bugs may have already been fixed on the latest kernel |
| 38 | 38 |
packages. |
| ... | ... |
@@ -249,7 +249,7 @@ Json Parameters: |
| 249 | 249 |
An ever increasing delay (double the previous delay, starting at 100mS) |
| 250 | 250 |
is added before each restart to prevent flooding the server. |
| 251 | 251 |
- **NetworkMode** - Sets the networking mode for the container. Supported |
| 252 |
- values are: `bridge`, `host`, and `container:<name|id>` |
|
| 252 |
+ values are: `bridge`, `host`, `none`, and `container:<name|id>` |
|
| 253 | 253 |
- **Devices** - A list of devices to add to the container specified in the |
| 254 | 254 |
form |
| 255 | 255 |
`{ "PathOnHost": "/dev/deviceName", "PathInContainer": "/dev/deviceName", "CgroupPermissions": "mrw"}`
|
| ... | ... |
@@ -596,7 +596,7 @@ Json Parameters: |
| 596 | 596 |
An ever increasing delay (double the previous delay, starting at 100mS) |
| 597 | 597 |
is added before each restart to prevent flooding the server. |
| 598 | 598 |
- **NetworkMode** - Sets the networking mode for the container. Supported |
| 599 |
- values are: `bridge`, `host`, and `container:<name|id>` |
|
| 599 |
+ values are: `bridge`, `host`, `none`, and `container:<name|id>` |
|
| 600 | 600 |
- **Devices** - A list of devices to add to the container specified in the |
| 601 | 601 |
form |
| 602 | 602 |
`{ "PathOnHost": "/dev/deviceName", "PathInContainer": "/dev/deviceName", "CgroupPermissions": "mrw"}`
|
| ... | ... |
@@ -249,7 +249,7 @@ Json Parameters: |
| 249 | 249 |
An ever increasing delay (double the previous delay, starting at 100mS) |
| 250 | 250 |
is added before each restart to prevent flooding the server. |
| 251 | 251 |
- **NetworkMode** - Sets the networking mode for the container. Supported |
| 252 |
- values are: `bridge`, `host`, and `container:<name|id>` |
|
| 252 |
+ values are: `bridge`, `host`, `none`, and `container:<name|id>` |
|
| 253 | 253 |
- **Devices** - A list of devices to add to the container specified in the |
| 254 | 254 |
form |
| 255 | 255 |
`{ "PathOnHost": "/dev/deviceName", "PathInContainer": "/dev/deviceName", "CgroupPermissions": "mrw"}`
|
| ... | ... |
@@ -251,7 +251,7 @@ Json Parameters: |
| 251 | 251 |
An ever increasing delay (double the previous delay, starting at 100mS) |
| 252 | 252 |
is added before each restart to prevent flooding the server. |
| 253 | 253 |
- **NetworkMode** - Sets the networking mode for the container. Supported |
| 254 |
- values are: `bridge`, `host`, and `container:<name|id>` |
|
| 254 |
+ values are: `bridge`, `host`, `none`, and `container:<name|id>` |
|
| 255 | 255 |
- **Devices** - A list of devices to add to the container specified in the |
| 256 | 256 |
form |
| 257 | 257 |
`{ "PathOnHost": "/dev/deviceName", "PathInContainer": "/dev/deviceName", "CgroupPermissions": "mrw"}`
|
| ... | ... |
@@ -270,7 +270,7 @@ Json Parameters: |
| 270 | 270 |
An ever increasing delay (double the previous delay, starting at 100mS) |
| 271 | 271 |
is added before each restart to prevent flooding the server. |
| 272 | 272 |
- **NetworkMode** - Sets the networking mode for the container. Supported |
| 273 |
- values are: `bridge`, `host`, and `container:<name|id>` |
|
| 273 |
+ values are: `bridge`, `host`, `none`, and `container:<name|id>` |
|
| 274 | 274 |
- **Devices** - A list of devices to add to the container specified in the |
| 275 | 275 |
form |
| 276 | 276 |
`{ "PathOnHost": "/dev/deviceName", "PathInContainer": "/dev/deviceName", "CgroupPermissions": "mrw"}`
|
| ... | ... |
@@ -281,7 +281,7 @@ Json Parameters: |
| 281 | 281 |
An ever increasing delay (double the previous delay, starting at 100mS) |
| 282 | 282 |
is added before each restart to prevent flooding the server. |
| 283 | 283 |
- **NetworkMode** - Sets the networking mode for the container. Supported |
| 284 |
- values are: `bridge`, `host`, and `container:<name|id>` |
|
| 284 |
+ values are: `bridge`, `host`, `none`, and `container:<name|id>` |
|
| 285 | 285 |
- **Devices** - A list of devices to add to the container specified as a JSON object in the |
| 286 | 286 |
form |
| 287 | 287 |
`{ "PathOnHost": "/dev/deviceName", "PathInContainer": "/dev/deviceName", "CgroupPermissions": "mrw"}`
|
| ... | ... |
@@ -289,7 +289,7 @@ Json Parameters: |
| 289 | 289 |
An ever increasing delay (double the previous delay, starting at 100mS) |
| 290 | 290 |
is added before each restart to prevent flooding the server. |
| 291 | 291 |
- **NetworkMode** - Sets the networking mode for the container. Supported |
| 292 |
- values are: `bridge`, `host`, and `container:<name|id>` |
|
| 292 |
+ values are: `bridge`, `host`, `none`, and `container:<name|id>` |
|
| 293 | 293 |
- **Devices** - A list of devices to add to the container specified as a JSON object in the |
| 294 | 294 |
form |
| 295 | 295 |
`{ "PathOnHost": "/dev/deviceName", "PathInContainer": "/dev/deviceName", "CgroupPermissions": "mrw"}`
|
| ... | ... |
@@ -305,7 +305,8 @@ Json Parameters: |
| 305 | 305 |
An ever increasing delay (double the previous delay, starting at 100mS) |
| 306 | 306 |
is added before each restart to prevent flooding the server. |
| 307 | 307 |
- **NetworkMode** - Sets the networking mode for the container. Supported |
| 308 |
- values are: `bridge`, `host`, and `container:<name|id>` |
|
| 308 |
+ standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. Any other value is taken |
|
| 309 |
+ as a custom network's name to which this container should connect to. |
|
| 309 | 310 |
- **Devices** - A list of devices to add to the container specified as a JSON object in the |
| 310 | 311 |
form |
| 311 | 312 |
`{ "PathOnHost": "/dev/deviceName", "PathInContainer": "/dev/deviceName", "CgroupPermissions": "mrw"}`
|
| ... | ... |
@@ -386,7 +386,8 @@ Json Parameters: |
| 386 | 386 |
An ever increasing delay (double the previous delay, starting at 100mS) |
| 387 | 387 |
is added before each restart to prevent flooding the server. |
| 388 | 388 |
- **NetworkMode** - Sets the networking mode for the container. Supported |
| 389 |
- values are: `bridge`, `host`, and `container:<name|id>` |
|
| 389 |
+ standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. Any other value is taken |
|
| 390 |
+ as a custom network's name to which this container should connect to. |
|
| 390 | 391 |
- **Devices** - A list of devices to add to the container specified as a JSON object in the |
| 391 | 392 |
form |
| 392 | 393 |
`{ "PathOnHost": "/dev/deviceName", "PathInContainer": "/dev/deviceName", "CgroupPermissions": "mrw"}`
|
| ... | ... |
@@ -579,7 +579,7 @@ The `<dest>` is an absolute path, or a path relative to `WORKDIR`, into which |
| 579 | 579 |
the source will be copied inside the destination container. |
| 580 | 580 |
|
| 581 | 581 |
ADD test relativeDir/ # adds "test" to `WORKDIR`/relativeDir/ |
| 582 |
- ADD test /absoluteDir # adds "test" to /absoluteDir |
|
| 582 |
+ ADD test /absoluteDir/ # adds "test" to /absoluteDir/ |
|
| 583 | 583 |
|
| 584 | 584 |
All new files and directories are created with a UID and GID of 0. |
| 585 | 585 |
|
| ... | ... |
@@ -691,7 +691,7 @@ The `<dest>` is an absolute path, or a path relative to `WORKDIR`, into which |
| 691 | 691 |
the source will be copied inside the destination container. |
| 692 | 692 |
|
| 693 | 693 |
COPY test relativeDir/ # adds "test" to `WORKDIR`/relativeDir/ |
| 694 |
- COPY test /absoluteDir # adds "test" to /absoluteDir |
|
| 694 |
+ COPY test /absoluteDir/ # adds "test" to /absoluteDir/ |
|
| 695 | 695 |
|
| 696 | 696 |
All new files and directories are created with a UID and GID of 0. |
| 697 | 697 |
|
| ... | ... |
@@ -31,7 +31,7 @@ volumes mounted inside the container. |
| 31 | 31 |
By default, the container being committed and its processes will be paused |
| 32 | 32 |
while the image is committed. This reduces the likelihood of encountering data |
| 33 | 33 |
corruption during the process of creating the commit. If this behavior is |
| 34 |
-undesired, set the 'p' option to false. |
|
| 34 |
+undesired, set the `--pause` option to false. |
|
| 35 | 35 |
|
| 36 | 36 |
The `--change` option will apply `Dockerfile` instructions to the image that is |
| 37 | 37 |
created. Supported `Dockerfile` instructions: |
| ... | ... |
@@ -23,7 +23,7 @@ You can copy from the container's file system to the local machine or the |
| 23 | 23 |
reverse, from the local filesystem to the container. If `-` is specified for |
| 24 | 24 |
either the `SRC_PATH` or `DEST_PATH`, you can also stream a tar archive from |
| 25 | 25 |
`STDIN` or to `STDOUT`. The `CONTAINER` can be a running or stopped container. |
| 26 |
-The `SRC_PATH` or `DEST_PATH` be a file or directory. |
|
| 26 |
+The `SRC_PATH` or `DEST_PATH` can be a file or directory. |
|
| 27 | 27 |
|
| 28 | 28 |
The `docker cp` command assumes container paths are relative to the container's |
| 29 | 29 |
`/` (root) directory. This means supplying the initial forward slash is optional; |
| ... | ... |
@@ -85,4 +85,4 @@ It is not possible to copy certain system files such as resources under |
| 85 | 85 |
Using `-` as the `SRC_PATH` streams the contents of `STDIN` as a tar archive. |
| 86 | 86 |
The command extracts the content of the tar to the `DEST_PATH` in container's |
| 87 | 87 |
filesystem. In this case, `DEST_PATH` must specify a directory. Using `-` as |
| 88 |
-`DEST_PATH` streams the contents of the resource as a tar archive to `STDOUT`. |
|
| 88 |
+the `DEST_PATH` streams the contents of the resource as a tar archive to `STDOUT`. |
| ... | ... |
@@ -37,7 +37,7 @@ Docker networks report the following events: |
| 37 | 37 |
|
| 38 | 38 |
The `--since` and `--until` parameters can be Unix timestamps, date formatted |
| 39 | 39 |
timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed |
| 40 |
-relative to the client machine’s time. If you do not provide the --since option, |
|
| 40 |
+relative to the client machine’s time. If you do not provide the `--since` option, |
|
| 41 | 41 |
the command returns only new and/or live events. Supported formats for date |
| 42 | 42 |
formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`, |
| 43 | 43 |
`2006-01-02T15:04:05.999999999`, `2006-01-02Z07:00`, and `2006-01-02`. The local |
| ... | ... |
@@ -47,7 +47,7 @@ Import to docker via pipe and `STDIN`. |
| 47 | 47 |
|
| 48 | 48 |
$ cat exampleimage.tgz | docker import - exampleimagelocal:new |
| 49 | 49 |
|
| 50 |
-Import with a commit message |
|
| 50 |
+Import with a commit message. |
|
| 51 | 51 |
|
| 52 | 52 |
$ cat exampleimage.tgz | docker import --message "New image imported from tarball" - exampleimagelocal:new |
| 53 | 53 |
|
| ... | ... |
@@ -94,7 +94,7 @@ NETWORK ID NAME DRIVER |
| 94 | 94 |
You can also filter for a substring in a name as this shows: |
| 95 | 95 |
|
| 96 | 96 |
```bash |
| 97 |
-$ docker ps --filter name=foo |
|
| 97 |
+$ docker network ls --filter name=foo |
|
| 98 | 98 |
NETWORK ID NAME DRIVER |
| 99 | 99 |
95e74588f40d foo bridge |
| 100 | 100 |
06e7eef0a170 foobar bridge |
| ... | ... |
@@ -104,8 +104,8 @@ NETWORK ID NAME DRIVER |
| 104 | 104 |
|
| 105 | 105 |
The `id` filter matches on all or part of a network's ID. |
| 106 | 106 |
|
| 107 |
-The following filter matches all networks with a name containing the |
|
| 108 |
-`06e7eef01700` string. |
|
| 107 |
+The following filter matches all networks with an ID containing the |
|
| 108 |
+`63d1ff1f77b0...` string. |
|
| 109 | 109 |
|
| 110 | 110 |
```bash |
| 111 | 111 |
$ docker network ls --filter id=63d1ff1f77b07ca51070a8c227e962238358bd310bde1529cf62e6c307ade161 |
| ... | ... |
@@ -113,14 +113,14 @@ NETWORK ID NAME DRIVER |
| 113 | 113 |
63d1ff1f77b0 dev bridge |
| 114 | 114 |
``` |
| 115 | 115 |
|
| 116 |
-You can also filter for a substring in a ID as this shows: |
|
| 116 |
+You can also filter for a substring in an ID as this shows: |
|
| 117 | 117 |
|
| 118 | 118 |
```bash |
| 119 |
-$ docker ps --filter id=95e74588f40d |
|
| 119 |
+$ docker network ls --filter id=95e74588f40d |
|
| 120 | 120 |
NETWORK ID NAME DRIVER |
| 121 | 121 |
95e74588f40d foo bridge |
| 122 | 122 |
|
| 123 |
-$ docker ps --filter id=95e |
|
| 123 |
+$ docker network ls --filter id=95e |
|
| 124 | 124 |
NETWORK ID NAME DRIVER |
| 125 | 125 |
95e74588f40d foo bridge |
| 126 | 126 |
``` |
| ... | ... |
@@ -25,7 +25,7 @@ To remove the network named 'my-network': |
| 25 | 25 |
``` |
| 26 | 26 |
|
| 27 | 27 |
To delete multiple networks in a single `docker network rm` command, provide |
| 28 |
-multiple network names or id's. The following example deletes a network with id |
|
| 28 |
+multiple network names or ids. The following example deletes a network with id |
|
| 29 | 29 |
`3695c422697f` and a network named `my-network`: |
| 30 | 30 |
|
| 31 | 31 |
```bash |
| ... | ... |
@@ -57,6 +57,8 @@ The currently supported filters are: |
| 57 | 57 |
* exited (int - the code of exited containers. Only useful with `--all`) |
| 58 | 58 |
* status (created|restarting|running|paused|exited|dead) |
| 59 | 59 |
* ancestor (`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) - filters containers that were created from the given image or a descendant. |
| 60 |
+* before (container's id or name) - filters containers created before given id or name |
|
| 61 |
+* since (container's id or name) - filters containers created since given id or name |
|
| 60 | 62 |
* isolation (default|process|hyperv) (Windows daemon only) |
| 61 | 63 |
|
| 62 | 64 |
|
| ... | ... |
@@ -163,6 +165,34 @@ in it's layer stack. |
| 163 | 163 |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
| 164 | 164 |
82a598284012 ubuntu:12.04.5 "top" 3 minutes ago Up 3 minutes sleepy_bose |
| 165 | 165 |
|
| 166 |
+#### Before |
|
| 167 |
+ |
|
| 168 |
+The `before` filter shows only containers created before the container with given id or name. For example, |
|
| 169 |
+having these containers created: |
|
| 170 |
+ |
|
| 171 |
+ $ docker ps |
|
| 172 |
+ CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
|
| 173 |
+ 9c3527ed70ce busybox "top" 14 seconds ago Up 15 seconds desperate_dubinsky |
|
| 174 |
+ 4aace5031105 busybox "top" 48 seconds ago Up 49 seconds focused_hamilton |
|
| 175 |
+ 6e63f6ff38b0 busybox "top" About a minute ago Up About a minute distracted_fermat |
|
| 176 |
+ |
|
| 177 |
+Filtering with `before` would give: |
|
| 178 |
+ |
|
| 179 |
+ $ docker ps -f before=9c3527ed70ce |
|
| 180 |
+ CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
|
| 181 |
+ 4aace5031105 busybox "top" About a minute ago Up About a minute focused_hamilton |
|
| 182 |
+ 6e63f6ff38b0 busybox "top" About a minute ago Up About a minute distracted_fermat |
|
| 183 |
+ |
|
| 184 |
+#### Since |
|
| 185 |
+ |
|
| 186 |
+The `since` filter shows only containers created since the container with given id or name. For example, |
|
| 187 |
+with the same containers as in `before` filter: |
|
| 188 |
+ |
|
| 189 |
+ $ docker ps -f since=6e63f6ff38b0 |
|
| 190 |
+ CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
|
| 191 |
+ 9c3527ed70ce busybox "top" 10 minutes ago Up 10 minutes desperate_dubinsky |
|
| 192 |
+ 4aace5031105 busybox "top" 10 minutes ago Up 10 minutes focused_hamilton |
|
| 193 |
+ |
|
| 166 | 194 |
|
| 167 | 195 |
## Formatting |
| 168 | 196 |
|
| ... | ... |
@@ -46,15 +46,15 @@ This command will delete all stopped containers. The command |
| 46 | 46 |
the `rm` command which will delete them. Any running containers will not be |
| 47 | 47 |
deleted. |
| 48 | 48 |
|
| 49 |
- $ docker rm -v redis |
|
| 50 |
- redis |
|
| 49 |
+ $ docker rm -v redis |
|
| 50 |
+ redis |
|
| 51 | 51 |
|
| 52 | 52 |
This command will remove the container and any volumes associated with it. |
| 53 | 53 |
Note that if a volume was specified with a name, it will not be removed. |
| 54 | 54 |
|
| 55 |
- $ docker create -v awesome:/foo -v /bar --name hello redis |
|
| 56 |
- hello |
|
| 57 |
- $ docker rm -v hello |
|
| 55 |
+ $ docker create -v awesome:/foo -v /bar --name hello redis |
|
| 56 |
+ hello |
|
| 57 |
+ $ docker rm -v hello |
|
| 58 | 58 |
|
| 59 | 59 |
In this example, the volume for `/foo` will remain intact, but the volume for |
| 60 | 60 |
`/bar` will be removed. The same behavior holds for volumes inherited with |
| ... | ... |
@@ -326,17 +326,17 @@ Guide. |
| 326 | 326 |
### Connect a container to a network (--net) |
| 327 | 327 |
|
| 328 | 328 |
When you start a container use the `--net` flag to connect it to a network. |
| 329 |
-This adds the `busybox` container to the `mynet` network. |
|
| 329 |
+This adds the `busybox` container to the `my-net` network. |
|
| 330 | 330 |
|
| 331 | 331 |
```bash |
| 332 |
-$ docker run -itd --net=my-multihost-network busybox |
|
| 332 |
+$ docker run -itd --net=my-net busybox |
|
| 333 | 333 |
``` |
| 334 | 334 |
|
| 335 | 335 |
You can also choose the IP addresses for the container with `--ip` and `--ip6` |
| 336 | 336 |
flags when you start the container on a user-defined network. |
| 337 | 337 |
|
| 338 | 338 |
```bash |
| 339 |
-$ docker run -itd --net=my-multihost-network --ip=10.10.9.75 busybox |
|
| 339 |
+$ docker run -itd --net=my-net --ip=10.10.9.75 busybox |
|
| 340 | 340 |
``` |
| 341 | 341 |
|
| 342 | 342 |
If you want to add a running container to a network use the `docker network connect` subcommand. |
| ... | ... |
@@ -19,9 +19,11 @@ feature to restrict your application's access. |
| 19 | 19 |
This feature is available only if the kernel is configured with `CONFIG_SECCOMP` |
| 20 | 20 |
enabled. |
| 21 | 21 |
|
| 22 |
-> **Note**: On Ubuntu 14.04, Debian Wheezy, and Debian Jessie, you must download |
|
| 23 |
-> the [latest static Docker Linux binary](../installation/binaries.md) to use |
|
| 24 |
-> seccomp. |
|
| 22 |
+> **Note**: Seccomp profiles require seccomp 2.2.1 and are only |
|
| 23 |
+> available starting with Debian 9 "Stretch", Ubuntu 15.10 "Wily", and |
|
| 24 |
+> Fedora 22. To use this feature on Ubuntu 14.04, Debian Wheezy, or |
|
| 25 |
+> Debian Jessie, you must download the [latest static Docker Linux binary](../installation/binaries.md). |
|
| 26 |
+> This feature is currently *not* available on other distributions. |
|
| 25 | 27 |
|
| 26 | 28 |
## Passing a profile for a container |
| 27 | 29 |
|
| ... | ... |
@@ -16,7 +16,7 @@ user-defined networks works differently compared to the containers connected |
| 16 | 16 |
to `default bridge` network. |
| 17 | 17 |
|
| 18 | 18 |
> **Note**: In order to maintain backward compatibility, the DNS configuration |
| 19 |
-> in `default bridge` network is retained with no behaviorial change. |
|
| 19 |
+> in `default bridge` network is retained with no behavioral change. |
|
| 20 | 20 |
> Please refer to the [DNS in default bridge network](default_network/configure-dns.md) |
| 21 | 21 |
> for more information on DNS configuration in the `default bridge` network. |
| 22 | 22 |
|
| ... | ... |
@@ -61,7 +61,7 @@ Four different options affect container domain name services. |
| 61 | 61 |
Using this option as you <code>run</code> a container gives the new |
| 62 | 62 |
container's <code>/etc/hosts</code> an extra entry named |
| 63 | 63 |
<code>ALIAS</code> that points to the IP address of the container |
| 64 |
- identified by <code>CONTAINER_NAME_or_ID<c/ode>. This lets processes |
|
| 64 |
+ identified by <code>CONTAINER_NAME_or_ID</code>. This lets processes |
|
| 65 | 65 |
inside the new container connect to the hostname <code>ALIAS</code> |
| 66 | 66 |
without having to know its IP. The <code>--link=</code> option is |
| 67 | 67 |
discussed in more detail below. Because Docker may assign a different IP |
| ... | ... |
@@ -86,16 +86,17 @@ lo Link encap:Local Loopback |
| 86 | 86 |
The `host` network adds a container on the hosts network stack. You'll find the |
| 87 | 87 |
network configuration inside the container is identical to the host. |
| 88 | 88 |
|
| 89 |
-With the exception of the the `bridge` network, you really don't need to |
|
| 89 |
+With the exception of the `bridge` network, you really don't need to |
|
| 90 | 90 |
interact with these default networks. While you can list and inspect them, you |
| 91 | 91 |
cannot remove them. They are required by your Docker installation. However, you |
| 92 | 92 |
can add your own user-defined networks and these you can remove when you no |
| 93 | 93 |
longer need them. Before you learn more about creating your own networks, it is |
| 94 |
-worth looking at the `default` network a bit. |
|
| 94 |
+worth looking at the default `bridge` network a bit. |
|
| 95 | 95 |
|
| 96 | 96 |
|
| 97 | 97 |
### The default bridge network in detail |
| 98 |
-The default bridge network is present on all Docker hosts. The `docker network inspect` |
|
| 98 |
+The default `bridge` network is present on all Docker hosts. The `docker network inspect` |
|
| 99 |
+command returns information about a network: |
|
| 99 | 100 |
|
| 100 | 101 |
``` |
| 101 | 102 |
$ docker network inspect bridge |
| ... | ... |
@@ -279,7 +280,7 @@ ff02::1 ip6-allnodes |
| 279 | 279 |
ff02::2 ip6-allrouters |
| 280 | 280 |
``` |
| 281 | 281 |
|
| 282 |
-The default `docker0` bridge network supports the use of port mapping and `docker run --link` to allow communications between containers in the `docker0` network. These techniques are cumbersome to set up and prone to error. While they are still available to you as techniques, it is better to avoid them and define your own bridge networks instead. |
|
| 282 |
+The default `docker0` bridge network supports the use of port mapping and `docker run --link` to allow communications between containers in the `docker0` network. These techniques are cumbersome to set up and prone to error. While they are still available to you as techniques, it is better to avoid them and define your own bridge networks instead. |
|
| 283 | 283 |
|
| 284 | 284 |
## User-defined networks |
| 285 | 285 |
|
| ... | ... |
@@ -483,7 +484,7 @@ built-in network drivers. For example: |
| 483 | 483 |
|
| 484 | 484 |
$ docker network create --driver weave mynet |
| 485 | 485 |
|
| 486 |
-You can inspect it, add containers too and from it, and so forth. Of course, |
|
| 486 |
+You can inspect it, add containers to and from it, and so forth. Of course, |
|
| 487 | 487 |
different plugins may make use of different technologies or frameworks. Custom |
| 488 | 488 |
networks can include features not present in Docker's default networks. For more |
| 489 | 489 |
information on writing plugins, see [Extending Docker](../../extend/index.md) and |
| ... | ... |
@@ -110,7 +110,7 @@ single 8GB general purpose SSD EBS volume. The Docker data directory |
| 110 | 110 |
centos latest c8a648134623 4 weeks ago 196.6 MB |
| 111 | 111 |
ubuntu 15.04 c8be1ac8145a 7 weeks ago 131.3 MB |
| 112 | 112 |
|
| 113 |
- $ du -hs /var/lib/docker |
|
| 113 |
+ $ sudo du -hs /var/lib/docker |
|
| 114 | 114 |
2.0G /var/lib/docker |
| 115 | 115 |
|
| 116 | 116 |
$ time docker run --rm -v /var/lib/docker:/var/lib/docker docker/v1.10-migrator |
| ... | ... |
@@ -275,12 +275,12 @@ image that you just pulled, make a change to it, and build a new image based on |
| 275 | 275 |
command. |
| 276 | 276 |
|
| 277 | 277 |
1. In an empty directory, create a simple `Dockerfile` that starts with the |
| 278 |
-2. ubuntu:15.04 image. |
|
| 278 |
+ ubuntu:15.04 image. |
|
| 279 | 279 |
|
| 280 | 280 |
FROM ubuntu:15.04 |
| 281 | 281 |
|
| 282 | 282 |
2. Add a new file called "newfile" in the image's `/tmp` directory with the |
| 283 |
-3. text "Hello world" in it. |
|
| 283 |
+ text "Hello world" in it. |
|
| 284 | 284 |
|
| 285 | 285 |
When you are done, the `Dockerfile` contains two lines: |
| 286 | 286 |
|
| ... | ... |
@@ -291,7 +291,7 @@ command. |
| 291 | 291 |
3. Save and close the file. |
| 292 | 292 |
|
| 293 | 293 |
4. From a terminal in the same folder as your `Dockerfile`, run the following |
| 294 |
-5. command: |
|
| 294 |
+ command: |
|
| 295 | 295 |
|
| 296 | 296 |
$ docker build -t changed-ubuntu . |
| 297 | 297 |
Sending build context to Docker daemon 2.048 kB |
| ... | ... |
@@ -310,14 +310,14 @@ command. |
| 310 | 310 |
The output above shows a new image with image ID `94e6b7d2c720`. |
| 311 | 311 |
|
| 312 | 312 |
5. Run the `docker images` command to verify the new `changed-ubuntu` image is |
| 313 |
-6. in the Docker host's local storage area. |
|
| 313 |
+ in the Docker host's local storage area. |
|
| 314 | 314 |
|
| 315 | 315 |
REPOSITORY TAG IMAGE ID CREATED SIZE |
| 316 | 316 |
changed-ubuntu latest 03b964f68d06 33 seconds ago 131.4 MB |
| 317 | 317 |
ubuntu 15.04 013f3d01d247 6 weeks ago 131.3 MB |
| 318 | 318 |
|
| 319 | 319 |
6. Run the `docker history` command to see which image layers were used to |
| 320 |
-7. create the new `changed-ubuntu` image. |
|
| 320 |
+ create the new `changed-ubuntu` image. |
|
| 321 | 321 |
|
| 322 | 322 |
$ docker history changed-ubuntu |
| 323 | 323 |
IMAGE CREATED CREATED BY SIZE COMMENT |
| ... | ... |
@@ -47,6 +47,7 @@ the running containers. |
| 47 | 47 |
.Ports - Exposed ports. |
| 48 | 48 |
.Status - Container status. |
| 49 | 49 |
.Size - Container disk size. |
| 50 |
+ .Names - Container names. |
|
| 50 | 51 |
.Labels - All labels assigned to the container. |
| 51 | 52 |
.Label - Value of a specific label for this container. For example `{{.Label "com.docker.swarm.cpu"}}`
|
| 52 | 53 |
|