improve content

Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
pull/462/head
Kang Huaishuai 2020-08-25 18:01:53 +08:00
parent ee26243625
commit 4682ba336f
No known key found for this signature in database
GPG Key ID: 5E515022F565DA09
7 changed files with 24 additions and 21 deletions

View File

@ -3,7 +3,7 @@
See [CONTRIBUTING](CONTRIBUTING.md) for contribution guidelines.
-->
### Proposed changes (Mandatory)
**Proposed changes (Mandatory)**
<!--
Tell us what you did and why:
@ -13,7 +13,7 @@
And details in other paragraphs.
-->
### Fix issues (Optional)
**Fix issues (Optional)**
<!--
Tell us what issues you fixed, e.g., fix #123

View File

@ -28,7 +28,6 @@ jobs:
"github.com/etcd-io/etcd/releases/download",\
"github.com/tianon/gosu/releases/download",\
"github.com/yeasy/docker_practice",\
"github.com/twang2218/gitlab-ce-zh.git",\
"github.com/AliyunContainerService/k8s-for-docker-desktop/raw",\
"dl-cdn.alpinelinux.org/alpine/edge/testing",\
"www.w3.org/1999/xhtml",\

View File

@ -8,6 +8,6 @@
Docker 使 [Volume](../data_management/volume.md)宿宿
Docker 使 [Volume](../data_management/volume.md) [宿](../data_management/bind-mounts.md)宿
使

View File

@ -80,7 +80,7 @@ RUN make -C /usr/src/redis install
```docker
FROM debian:stretch
RUN buildDeps='gcc libc6-dev make wget' \
RUN set -x; buildDeps='gcc libc6-dev make wget' \
&& apt-get update \
&& apt-get install -y $buildDeps \
&& wget -O redis.tar.gz "http://download.redis.io/releases/redis-5.0.3.tar.gz" \
@ -177,17 +177,23 @@ Sending build context to Docker daemon 2.048 kB
`docker build` URL Git repo
```bash
$ docker build https://github.com/twang2218/gitlab-ce-zh.git#:11.1
# $env:DOCKER_BUILDKIT=0
# export DOCKER_BUILDKIT=0
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM gitlab/gitlab-ce:11.1.0-ce.0
11.1.0-ce.0: Pulling from gitlab/gitlab-ce
aed15891ba52: Already exists
773ae8583d14: Already exists
...
$ docker build -t hello-world https://github.com/docker-library/hello-world.git#master:amd64/hello-world
Step 1/3 : FROM scratch
--->
Step 2/3 : COPY hello /
---> ac779757d46e
Step 3/3 : CMD ["/hello"]
---> Running in d2a513a760ed
Removing intermediate container d2a513a760ed
---> 038ad4142d2b
Successfully built 038ad4142d2b
```
Git repo `master` `/11.1/` Docker `git clone`
Git repo `master` `/amd64/hello-world/` Docker `git clone`
### tar

View File

@ -16,7 +16,7 @@ $ docker run --name webserver -d -p 80:80 nginx
`nginx` `webserver` 80 访 `nginx`
Linux Docker使 Docker Desktop for Mac/Windows访<http://localhost>;如果使用的是 Docker Toolbox或者是在虚拟机、云服务器上安装的 Docker则需要将 `localhost` 换为虚拟机地址或者实际云服务器地址。
Docker访`http://localhost` Docker `localhost`
访 Nginx
@ -116,7 +116,7 @@ e43d811ce2f4 4 weeks ago /bin/sh -c #(nop) CMD ["nginx" "-g" "da
docker run --name web2 -d -p 81:80 nginx:v2
```
`web2` `81` Docker Desktop for Mac/Windows Linux 访 <http://localhost:81> 看到结果,其内容应该和之前修改后的 `webserver` 一样。
`web2` `81` 访 `http://localhost:81` `webserver`
使 `docker commit`
@ -124,7 +124,7 @@ docker run --name web2 -d -p 81:80 nginx:v2
使 `docker commit` 使
`docker diff webserver` `/usr/share/nginx/html/index.html`
`docker diff webserver` `/usr/share/nginx/html/index.html`
使 `docker commit` ****使

View File

@ -10,7 +10,7 @@ docker pull [选项] [Docker Registry 地址[:端口号]/]仓库名[:标签]
`docker pull --help`
* Docker `<域名/IP>[:端口号]` Docker Hub
* Docker `<域名/IP>[:端口号]` Docker Hub(docker.io)
* `<用户名>/<软件名>` Docker Hub `library`
@ -40,9 +40,7 @@ Status: Downloaded newer image for ubuntu:18.04
`ubuntu:18.04` `bash`
```bash
$ docker run -it --rm \
ubuntu:18.04 \
bash
$ docker run -it --rm ubuntu:18.04 bash
root@e7009c6ce357:/# cat /etc/os-release
NAME="Ubuntu"

View File

@ -2,7 +2,7 @@
**Docker** `dotCloud` [Solomon Hykes](https://github.com/shykes) 在法国期间发起的一个公司内部项目,它是基于 `dotCloud` 公司多年云服务技术的一次革新,并于 [2013 年 3 月以 Apache 2.0 授权协议开源][docker-soft],主要项目代码在 [GitHub](https://github.com/moby/moby) 上进行维护。`Docker` 项目后来还加入了 Linux 基金会,并成立推动 [开放容器联盟OCI](https://opencontainers.org/)。
**Docker** 广 [GitHub ](https://github.com/moby/moby) 已经超过 5 万 4 千个星标和一万多个 `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)。