Update cmd result

Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
pull/485/head
Kang Huaishuai 2021-03-07 23:56:19 +08:00
parent 0a87d2a643
commit 6f810c89f3
No known key found for this signature in database
GPG Key ID: 5E515022F565DA09
5 changed files with 34 additions and 37 deletions

View File

@ -28,12 +28,11 @@ azukiapp/busybox This image is meant to be used as the base...
```bash ```bash
$ docker pull busybox:latest $ docker pull busybox:latest
busybox:latest: The image you are pulling has been verified latest: Pulling from library/busybox
e433a6c5b276: Pull complete 5c4213be9af9: Pull complete
e72ac664f4f0: Pull complete Digest: sha256:c6b45a95f932202dbb27c31333c4789f45184a744060f6e569cc9d2bf1b9ad6f
511136ea3c5a: Pull complete
df7546f9f060: Pull complete
Status: Downloaded newer image for busybox:latest Status: Downloaded newer image for busybox:latest
docker.io/library/busybox:latest
``` ```
`busybox` **2.433 MB** `busybox` **2.433 MB**

View File

@ -9,21 +9,21 @@ redis latest 5f515359c7f8 5 days ago
nginx latest 05a60462f8ba 5 days ago 181 MB nginx latest 05a60462f8ba 5 days ago 181 MB
mongo 3.2 fe9198c04d62 5 days ago 342 MB mongo 3.2 fe9198c04d62 5 days ago 342 MB
<none> <none> 00285df0df87 5 days ago 342 MB <none> <none> 00285df0df87 5 days ago 342 MB
ubuntu 18.04 f753707788c5 4 weeks ago 127 MB ubuntu 18.04 329ed837d508 3 days ago 63.3MB
ubuntu latest f753707788c5 4 weeks ago 127 MB ubuntu bionic 329ed837d508 3 days ago 63.3MB
``` ```
`仓库名``标签``镜像 ID``创建时间` `所占用的空间` `仓库名``标签``镜像 ID``创建时间` `所占用的空间`
** ID** **** `ubuntu:18.04` `ubuntu:latest` ID ** ID** **** `ubuntu:18.04` `ubuntu:bionic` ID
## ##
Docker Hub `ubuntu:18.04` `127 MB` [Docker Hub](https://hub.docker.com/_/ubuntu?tab=tags) 显示的却是 `50 MB`。这是因为 Docker Hub 中显示的体积是压缩后的体积。在镜像下载和上传过程中镜像是保持着压缩状态的,因此 Docker Hub 所显示的大小是网络传输中更关心的流量大小。而 `docker image ls` 显示的是镜像下载到本地后,展开的大小,准确说,是展开后的各层所占空间的总和,因为镜像到本地后,查看空间的时候,更关心的是本地磁盘空间占用的大小。 Docker Hub `ubuntu:18.04` `63.3MB` [Docker Hub](https://hub.docker.com/layers/ubuntu/library/ubuntu/bionic/images/sha256-32776cc92b5810ce72e77aca1d949de1f348e1d281d3f00ebcc22a3adcdc9f42?context=explore) 显示的却是 `25.47 MB`。这是因为 Docker Hub 中显示的体积是压缩后的体积。在镜像下载和上传过程中镜像是保持着压缩状态的,因此 Docker Hub 所显示的大小是网络传输中更关心的流量大小。而 `docker image ls` 显示的是镜像下载到本地后,展开的大小,准确说,是展开后的各层所占空间的总和,因为镜像到本地后,查看空间的时候,更关心的是本地磁盘空间占用的大小。
`docker image ls` Docker 使 Docker 使 Union FS `docker image ls` Docker 使 Docker 使 Union FS
便 `docker system df` 便
```bash ```bash
$ docker system df $ docker system df
@ -76,8 +76,8 @@ $ docker image ls -a
```bash ```bash
$ docker image ls ubuntu $ docker image ls ubuntu
REPOSITORY TAG IMAGE ID CREATED SIZE REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu 18.04 f753707788c5 4 weeks ago 127 MB ubuntu 18.04 329ed837d508 3 days ago 63.3MB
ubuntu latest f753707788c5 4 weeks ago 127 MB ubuntu bionic 329ed837d508 3 days ago 63.3MB
``` ```
@ -85,7 +85,7 @@ ubuntu latest f753707788c5 4 weeks ago
```bash ```bash
$ docker image ls ubuntu:18.04 $ docker image ls ubuntu:18.04
REPOSITORY TAG IMAGE ID CREATED SIZE REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu 18.04 f753707788c5 4 weeks ago 127 MB ubuntu 18.04 329ed837d508 3 days ago 63.3MB
``` ```
`docker image ls` `--filter` `-f`使 `mongo:3.2` `docker image ls` `--filter` `-f`使 `mongo:3.2`
@ -116,9 +116,8 @@ $ docker image ls -q
05a60462f8ba 05a60462f8ba
fe9198c04d62 fe9198c04d62
00285df0df87 00285df0df87
f753707788c5 329ed837d508
f753707788c5 329ed837d508
1e0c3dd64ccd
``` ```
`--filter` `-q` ID `docker` Docker 使 `--filter` `-q` ID `docker` Docker 使
@ -133,9 +132,8 @@ $ docker image ls --format "{{.ID}}: {{.Repository}}"
05a60462f8ba: nginx 05a60462f8ba: nginx
fe9198c04d62: mongo fe9198c04d62: mongo
00285df0df87: <none> 00285df0df87: <none>
f753707788c5: ubuntu 329ed837d508: ubuntu
f753707788c5: ubuntu 329ed837d508: ubuntu
1e0c3dd64ccd: ubuntu
``` ```
@ -147,6 +145,6 @@ IMAGE ID REPOSITORY TAG
05a60462f8ba nginx latest 05a60462f8ba nginx latest
fe9198c04d62 mongo 3.2 fe9198c04d62 mongo 3.2
00285df0df87 <none> <none> 00285df0df87 <none> <none>
f753707788c5 ubuntu 18.04 329ed837d508 ubuntu 18.04
f753707788c5 ubuntu latest 329ed837d508 ubuntu bionic
``` ```

View File

@ -18,13 +18,12 @@ docker pull [选项] [Docker Registry 地址[:端口号]/]仓库名[:标签]
```bash ```bash
$ docker pull ubuntu:18.04 $ docker pull ubuntu:18.04
18.04: Pulling from library/ubuntu 18.04: Pulling from library/ubuntu
bf5d46315322: Pull complete 92dc2a97ff99: Pull complete
9f13e0ac480c: Pull complete be13a9d27eb8: Pull complete
e8988b5b3097: Pull complete c8299583700a: Pull complete
40af181810e7: Pull complete Digest: sha256:4bc3ae6596938cb0d9e5ac51a1152ec9dcac2a1c50829c74abd9c4361e321b26
e6f7c7e5c03e: Pull complete
Digest: sha256:147913621d9cdea08853f6ba9116c2e27a3ceffecf3b492983ae97c3d643fbbe
Status: Downloaded newer image for ubuntu:18.04 Status: Downloaded newer image for ubuntu:18.04
docker.io/library/ubuntu:18.04
``` ```
Docker Docker Hub `ubuntu:18.04` `library/ubuntu` `18.04` Docker Docker Hub `ubuntu:18.04` `library/ubuntu` `18.04`

View File

@ -4,7 +4,7 @@
**Docker** 广 [GitHub ](https://github.com/moby/moby) 已经超过 5 万 7 千个星标和一万多个 `fork`。甚至由于 `Docker` 项目的火爆,在 `2013` 年底,[dotCloud 公司决定改名为 Docker](https://www.docker.com/blog/dotcloud-is-becoming-docker-inc/)。`Docker` 最初是在 `Ubuntu 12.04` 上开发实现的;`Red Hat` 则从 `RHEL 6.5` 开始对 `Docker` 进行支持;`Google` 也在其 `PaaS` 产品中广泛应用 `Docker`。 **Docker** 广 [GitHub ](https://github.com/moby/moby) 已经超过 5 万 7 千个星标和一万多个 `fork`。甚至由于 `Docker` 项目的火爆,在 `2013` 年底,[dotCloud 公司决定改名为 Docker](https://www.docker.com/blog/dotcloud-is-becoming-docker-inc/)。`Docker` 最初是在 `Ubuntu 12.04` 上开发实现的;`Red Hat` 则从 `RHEL 6.5` 开始对 `Docker` 进行支持;`Google` 也在其 `PaaS` 产品中广泛应用 `Docker`。
**Docker** 使 `Google` [Go ](https://golang.org/) 进行开发实现,基于 `Linux` 内核的 [cgroup](https://zh.wikipedia.org/wiki/Cgroups)[namespace](https://en.wikipedia.org/wiki/Linux_namespaces),以及 [OverlayFS](https://docs.docker.com/storage/storagedriver/overlayfs-driver/) 类的 [Union FS](https://en.wikipedia.org/wiki/Union_mount) 等技术,对进程进行封装隔离,属于 [操作系统层面的虚拟化技术](https://en.wikipedia.org/wiki/Operating-system-level_virtualization)。由于隔离的进程独立于宿主和其它的隔离的进程,因此也称其为容器。最初实现是基于 [LXC](https://linuxcontainers.org/lxc/introduction/),从 0.7 版本以后开始去除 `LXC`,转而使用自行开发的 [libcontainer](https://github.com/docker/libcontainer),从 1.11 开始,则进一步演进为使用 [runC](https://github.com/opencontainers/runc) 和 [containerd](https://github.com/containerd/containerd)。 **Docker** 使 `Google` [Go ](https://golang.org/) 进行开发实现,基于 `Linux` 内核的 [cgroup](https://zh.wikipedia.org/wiki/Cgroups)[namespace](https://en.wikipedia.org/wiki/Linux_namespaces),以及 [OverlayFS](https://docs.docker.com/storage/storagedriver/overlayfs-driver/) 类的 [Union FS](https://en.wikipedia.org/wiki/Union_mount) 等技术,对进程进行封装隔离,属于 [操作系统层面的虚拟化技术](https://en.wikipedia.org/wiki/Operating-system-level_virtualization)。由于隔离的进程独立于宿主和其它的隔离的进程,因此也称其为容器。最初实现是基于 [LXC](https://linuxcontainers.org/lxc/introduction/),从 `0.7` 版本以后开始去除 `LXC`,转而使用自行开发的 [libcontainer](https://github.com/docker/libcontainer),从 `1.11` 版本开始,则进一步演进为使用 [runC](https://github.com/opencontainers/runc) 和 [containerd](https://github.com/containerd/containerd)。
![Docker ](https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/media/docker-on-linux.png) ![Docker ](https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/media/docker-on-linux.png)

View File

@ -28,7 +28,7 @@ saltstack/centos-6-minimal
tutum/centos-6.4 DEPRECATED. Use tutum/centos:6.4 instead. ... 5 [OK] tutum/centos-6.4 DEPRECATED. Use tutum/centos:6.4 instead. ... 5 [OK]
``` ```
OFFICIAL AUTOMATED `OFFICIAL` `AUTOMATED`
@ -42,11 +42,12 @@ tutum/centos-6.4 DEPRECATED. Use tutum/centos:6.4
```bash ```bash
$ docker pull centos $ docker pull centos
Pulling repository centos Using default tag: latest
0b443ba03958: Download complete latest: Pulling from library/centos
539c0211cd76: Download complete 7a0437f04f83: Pull complete
511136ea3c5a: Download complete Digest: sha256:5528e8b1b1719d34604c87e11dcd1c0a20bedf46e83b5632cdeac91b8c04efc1
7064731afe90: Download complete Status: Downloaded newer image for centos:latest
docker.io/library/centos:latest
``` ```
## ##
@ -74,17 +75,17 @@ username/ubuntu
## ##
Automated Builds便 `Automated Builds`便
Docker Hub [GitHub](https://github.com) 或 [BitBucket](https://bitbucket.org))上的项目,一旦项目发生新的提交 commit或者创建了新的标签tagDocker Hub 会自动构建镜像并推送到 Docker Hub 中。 Docker Hub [GitHub](https://github.com) 或 [BitBucket](https://bitbucket.org))上的项目,一旦项目发生新的提交 `commit`)或者创建了新的标签(`tag`Docker Hub 会自动构建镜像并推送到 Docker Hub 中。
* Docker Hub * Docker Hub
* Docker Hub Account SettingsLinked Accounts * Docker Hub `Account Settings``Linked Accounts`
* Docker Hub `Builds` `Configure Automated Builds` * Docker Hub `Builds` `Configure Automated Builds`