From 00dcf6acf0c3002de49c6126b6bce947209246e0 Mon Sep 17 00:00:00 2001 From: Amin Cheloh Date: Fri, 21 Oct 2016 06:47:11 +0700 Subject: [PATCH 1/6] Update swarm/install-manual.md avoid problem Avoid problem when restart consul container and the IP has been changed --- swarm/install-manual.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/swarm/install-manual.md b/swarm/install-manual.md index b34ae8c78c..b17275b56c 100644 --- a/swarm/install-manual.md +++ b/swarm/install-manual.md @@ -177,9 +177,13 @@ 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 syntax: - $ 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= + + Replacing `` with the IP address from the previous command, for example: + + $ docker run -d -p 8500:8500 --name=consul progrium/consul -server -bootstrap -advertise=172.30.0.161 4. Enter `docker ps`. From fa5e8c3d5c2496303e2c2488a765b826e427caed Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Tue, 1 Nov 2016 18:48:25 +0800 Subject: [PATCH 2/6] Explain downloaded image and container sizes Signed-off-by: Yuqian Yang --- engine/tutorials/dockerimages.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/engine/tutorials/dockerimages.md b/engine/tutorials/dockerimages.md index 06713dfe47..e4b65dd4a1 100644 --- a/engine/tutorials/dockerimages.md +++ b/engine/tutorials/dockerimages.md @@ -568,6 +568,33 @@ 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 sizes of images and containers + +An image is +[stored in layers](../userguide/storagedriver/imagesandcontainers.md), +and shared with other images, the real disk usage depends on existing layers +on your host. A container is running on +[a writable layer](../userguide/storagedriver/imagesandcontainers.md#/container-and-layers) +on top of a readonly rootfs. + +You can figure the size of image layers with `docker history` command. + + $ docker history centos:centos7 + + IMAGE CREATED CREATED BY SIZE + 970633036444 6 weeks ago /bin/sh -c #(nop) CMD ["/bin/bash"] 0 B + 6 weeks ago /bin/sh -c #(nop) LABEL name=CentOS Base Imag 0 B + 6 weeks ago /bin/sh -c #(nop) ADD file:44ef4e10b27d8c464a 196.7 MB + 10 weeks ago /bin/sh -c #(nop) MAINTAINER https://github.c 0 B + +Also, you can check the sizes of containers by performing `docker ps` command with `-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 From ace5a7a95204d0901ec409580fcceae158bbdb89 Mon Sep 17 00:00:00 2001 From: John Mulhausen Date: Mon, 28 Nov 2016 14:27:55 -0800 Subject: [PATCH 3/6] s/syntax/command --- swarm/install-manual.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swarm/install-manual.md b/swarm/install-manual.md index b17275b56c..cde86481c1 100644 --- a/swarm/install-manual.md +++ b/swarm/install-manual.md @@ -177,7 +177,7 @@ host as one of the Swarm managers. 2. From the output, copy the `eth0` IP address from `inet addr`. -3. To set up a discovery backend, use the following syntax: +3. To set up a discovery backend, use the following command: $ docker run -d -p 8500:8500 --name=consul progrium/consul -server -bootstrap -advertise= From d621663c6fd4a22086c504bde76f39909f38e8e4 Mon Sep 17 00:00:00 2001 From: John Mulhausen Date: Mon, 28 Nov 2016 14:28:42 -0800 Subject: [PATCH 4/6] Removing superfluous example command --- swarm/install-manual.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/swarm/install-manual.md b/swarm/install-manual.md index cde86481c1..b3da7d7493 100644 --- a/swarm/install-manual.md +++ b/swarm/install-manual.md @@ -177,13 +177,9 @@ host as one of the Swarm managers. 2. From the output, copy the `eth0` IP address from `inet addr`. -3. To set up a discovery backend, use the following command: +3. To set up a discovery backend, use the following command, replacing `` with the IP address from the previous command: $ docker run -d -p 8500:8500 --name=consul progrium/consul -server -bootstrap -advertise= - - Replacing `` with the IP address from the previous command, for example: - - $ docker run -d -p 8500:8500 --name=consul progrium/consul -server -bootstrap -advertise=172.30.0.161 4. Enter `docker ps`. From 2e5892e4a5b2a86d7084ab195bb965ef42a896dc Mon Sep 17 00:00:00 2001 From: John Mulhausen Date: Mon, 28 Nov 2016 14:52:55 -0800 Subject: [PATCH 5/6] Writerly changes --- engine/tutorials/dockerimages.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/engine/tutorials/dockerimages.md b/engine/tutorials/dockerimages.md index e4b65dd4a1..ace16c5cbf 100644 --- a/engine/tutorials/dockerimages.md +++ b/engine/tutorials/dockerimages.md @@ -572,12 +572,14 @@ Delete the `training/sinatra` image as you don't need it anymore. An image is [stored in layers](../userguide/storagedriver/imagesandcontainers.md), -and shared with other images, the real disk usage depends on existing layers -on your host. A container is running on +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. -You can figure the size of image layers with `docker history` command. +Use `docker history` to see the size of image layers on your host: $ docker history centos:centos7 @@ -587,7 +589,7 @@ You can figure the size of image layers with `docker history` command. 6 weeks ago /bin/sh -c #(nop) ADD file:44ef4e10b27d8c464a 196.7 MB 10 weeks ago /bin/sh -c #(nop) MAINTAINER https://github.c 0 B -Also, you can check the sizes of containers by performing `docker ps` command with `-s`. +Check the size of containers with `docker ps -s`: $ docker ps -s From 921964a17c51cb00944bea065fd950259ad84333 Mon Sep 17 00:00:00 2001 From: John Mulhausen Date: Mon, 28 Nov 2016 14:55:56 -0800 Subject: [PATCH 6/6] s/sizes/size --- engine/tutorials/dockerimages.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/tutorials/dockerimages.md b/engine/tutorials/dockerimages.md index 461e565187..9833b05e03 100644 --- a/engine/tutorials/dockerimages.md +++ b/engine/tutorials/dockerimages.md @@ -559,7 +559,7 @@ 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 sizes of images and containers +## Check size of images and containers An image is [stored in layers](../userguide/storagedriver/imagesandcontainers.md), @@ -594,4 +594,4 @@ 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). \ No newline at end of file +Go to [Network containers](networkingcontainers.md).