mirror of https://github.com/docker/docs.git
Merge branch 'master' of https://github.com/docker/docker.github.io
This commit is contained in:
commit
90819b7133
|
@ -559,10 +559,39 @@ Delete the `training/sinatra` image as you don't need it anymore.
|
|||
> **Note:** To remove an image from the host, please make sure
|
||||
> that there are no containers actively based on it.
|
||||
|
||||
## Check size of images and containers
|
||||
|
||||
An image is
|
||||
[stored in layers](../userguide/storagedriver/imagesandcontainers.md),
|
||||
shared with other images on the host, so the real disk usage depends on
|
||||
how much layer overlap is happening between images on a host.
|
||||
|
||||
A container runs on
|
||||
[a writable layer](../userguide/storagedriver/imagesandcontainers.md#/container-and-layers)
|
||||
on top of a readonly rootfs.
|
||||
|
||||
Use `docker history` to see the size of image layers on your host:
|
||||
|
||||
$ docker history centos:centos7
|
||||
|
||||
IMAGE CREATED CREATED BY SIZE
|
||||
970633036444 6 weeks ago /bin/sh -c #(nop) CMD ["/bin/bash"] 0 B
|
||||
<missing> 6 weeks ago /bin/sh -c #(nop) LABEL name=CentOS Base Imag 0 B
|
||||
<missing> 6 weeks ago /bin/sh -c #(nop) ADD file:44ef4e10b27d8c464a 196.7 MB
|
||||
<missing> 10 weeks ago /bin/sh -c #(nop) MAINTAINER https://github.c 0 B
|
||||
|
||||
Check the size of containers with `docker ps -s`:
|
||||
|
||||
$ docker ps -s
|
||||
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE
|
||||
cb7827c19ef7 docker-docs:is-11160-explain-image-container-size-prediction "hugo server --port=8" About a minute ago Up About a minute 0.0.0.0:8000->8000/tcp evil_hodgkin 0 B (virtual 949.2 MB)
|
||||
|
||||
|
||||
# Next steps
|
||||
|
||||
Until now you've seen how to build individual applications inside Docker
|
||||
containers. Now learn how to build whole application stacks with Docker
|
||||
by networking together multiple Docker containers.
|
||||
|
||||
Go to [Network containers](networkingcontainers.md).
|
||||
Go to [Network containers](networkingcontainers.md).
|
||||
|
|
|
@ -174,9 +174,9 @@ host as one of the Swarm managers.
|
|||
|
||||
2. From the output, copy the `eth0` IP address from `inet addr`.
|
||||
|
||||
3. Paste the launch command into the command line:
|
||||
3. To set up a discovery backend, use the following command, replacing `<consul0_ip>` with the IP address from the previous command:
|
||||
|
||||
$ docker run -d -p 8500:8500 --name=consul progrium/consul -server -bootstrap
|
||||
$ docker run -d -p 8500:8500 --name=consul progrium/consul -server -bootstrap -advertise=<consul0_ip>
|
||||
|
||||
4. Enter `docker ps`.
|
||||
|
||||
|
|
Loading…
Reference in New Issue