From 9f9151580d88e81fd1d913bf04b21389bada6fed Mon Sep 17 00:00:00 2001 From: Kim Wu Date: Fri, 13 Jan 2017 14:21:35 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=94=B9=E6=AD=A3=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E9=94=99=E6=BC=8F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CMD ["nginx" "-g" "daemon off;"] -> CMD ["nginx", "-g", "daemon off;"] --- image/dockerfile/cmd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image/dockerfile/cmd.md b/image/dockerfile/cmd.md index 56c421a..120abc3 100644 --- a/image/dockerfile/cmd.md +++ b/image/dockerfile/cmd.md @@ -45,5 +45,5 @@ CMD service nginx start 正确的做法是直接执行 `nginx` 可执行文件,并且要求以前台形式运行。比如: ```Dockerfile -CMD ["nginx" "-g" "daemon off;"] +CMD ["nginx", "-g", "daemon off;"] ``` From 2376e1ea188bcdd138b6859def7a78851d0a36f7 Mon Sep 17 00:00:00 2001 From: qiuyin Date: Fri, 20 Jan 2017 18:10:20 +0900 Subject: [PATCH 2/6] Update volume.md --- data_management/volume.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/data_management/volume.md b/data_management/volume.md index 42542e0..0d26f33 100644 --- a/data_management/volume.md +++ b/data_management/volume.md @@ -46,14 +46,19 @@ $ docker inspect web ... ``` -在输出的内容中找到其中和数据卷相关的部分,可以看到所有的数据卷都是创建在主机的`/var/lib/docker/volumes/`下面的 +在输出的内容中找到其中和数据卷相关的部分,可以看到所有的数据卷都是创建在主机的`/mnt/sda1/var/lib/docker/volumes/....`下面了。 ``` -"Volumes": { - "/webapp": "/var/lib/docker/volumes/fac362...80535" -}, -"VolumesRW": { - "/webapp": true -} +"Mounts": [ + { + "Name": "b53ebd40054dae599faf7c9666acfe205c3e922fc3e8bc3f2fd178ed788f1c29", + "Source": "/mnt/sda1/var/lib/docker/volumes/b53ebd40054dae599faf7c9666acfe205c3e922fc3e8bc3f2fd178ed788f1c29/_data", + "Destination": "/webapp", + "Driver": "local", + "Mode": "", + "RW": true, + "Propagation": "" + } + ] ... ``` From 16247bb8c3b6bfa56eb757655cebdaa55746ba6a Mon Sep 17 00:00:00 2001 From: qiuyin Date: Sat, 21 Jan 2017 20:18:39 +0900 Subject: [PATCH 3/6] =?UTF-8?q?=E5=AF=B9=E6=9F=A5=E7=9C=8B=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=8D=B7=E7=9A=84=E5=85=B7=E4=BD=93=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=8C=E8=A1=A5=E5=85=85=E4=BA=86=E6=9C=80=E6=96=B0=E7=89=88?= =?UTF-8?q?=E7=9A=84=E5=86=85=E5=AE=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data_management/volume.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/data_management/volume.md b/data_management/volume.md index 0d26f33..b839247 100644 --- a/data_management/volume.md +++ b/data_management/volume.md @@ -46,7 +46,17 @@ $ docker inspect web ... ``` -在输出的内容中找到其中和数据卷相关的部分,可以看到所有的数据卷都是创建在主机的`/mnt/sda1/var/lib/docker/volumes/....`下面了。 +在输出的内容中找到其中和数据卷相关的部分,可以看到所有的数据卷都是创建在主机的`/var/lib/docker/volumes/`下面的 +``` +"Volumes": { + "/webapp": "/var/lib/docker/volumes/fac362...80535" +}, +"VolumesRW": { + "/webapp": true +} +... +``` +注:从Docker 1.13.0起,数据卷配置在"Mounts"Key下面,可以看到所有的数据卷都是创建在主机的`/mnt/sda1/var/lib/docker/volumes/....`下面了。 ``` "Mounts": [ { From 1ab64b2775a8b977b76c2bd54903b45e3b111b83 Mon Sep 17 00:00:00 2001 From: qiuyin Date: Thu, 26 Jan 2017 11:10:42 +0900 Subject: [PATCH 4/6] Update volume.md --- data_management/volume.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_management/volume.md b/data_management/volume.md index b839247..6d44883 100644 --- a/data_management/volume.md +++ b/data_management/volume.md @@ -56,7 +56,7 @@ $ docker inspect web } ... ``` -注:从Docker 1.13.0起,数据卷配置在"Mounts"Key下面,可以看到所有的数据卷都是创建在主机的`/mnt/sda1/var/lib/docker/volumes/....`下面了。 +注:从Docker 1.8.0起,数据卷配置在"Mounts"Key下面,可以看到所有的数据卷都是创建在主机的`/mnt/sda1/var/lib/docker/volumes/....`下面了。 ``` "Mounts": [ { From 5bc5219fa23be1f203f2e3d28c5b99a62b06f8ab Mon Sep 17 00:00:00 2001 From: mzeht Date: Tue, 7 Feb 2017 21:59:32 +0800 Subject: [PATCH 5/6] =?UTF-8?q?appendix/repo/ubuntu.md=E8=AF=AD=E6=B3=95?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- appendix/repo/ubuntu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appendix/repo/ubuntu.md b/appendix/repo/ubuntu.md index 2253678..46faddf 100644 --- a/appendix/repo/ubuntu.md +++ b/appendix/repo/ubuntu.md @@ -3,7 +3,7 @@ ### 基本信息 [Ubuntu](https://en.wikipedia.org/wiki/Ubuntu) 是流行的 Linux 发行版,其自带软件版本往往较新一些。 -该仓库位于 https://hub.docker.com/_/ubuntu/,提供了 Ubuntu 从 12.04 ~ 16.10 各个版本的镜像。 +该仓库位于 https://hub.docker.com/_/ubuntu/ ,提供了 Ubuntu 从 12.04 ~ 16.10 各个版本的镜像。 ### 使用方法 默认会启动一个最小化的 Ubuntu 环境。 @@ -140,3 +140,5 @@ RUN sed -i 's/^#\s*\(deb.*universe\)$/\1/g' /etc/apt/sources.list # overwrite this with 'CMD []' in a dependent Dockerfile CMD ["/bin/bash"] ``` + + From 25178fd616df2abc71db9c5e91bade0c4f0e4bf8 Mon Sep 17 00:00:00 2001 From: mzeht Date: Tue, 7 Feb 2017 22:04:05 +0800 Subject: [PATCH 6/6] =?UTF-8?q?appendix/repo=E7=9B=AE=E5=BD=95=E4=B8=8B?= =?UTF-8?q?=E8=AF=AD=E6=B3=95=E6=A0=BC=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- appendix/repo/centos.md | 4 +++- appendix/repo/mongodb.md | 5 +++-- appendix/repo/mysql.md | 4 +++- appendix/repo/nginx.md | 4 +++- appendix/repo/nodejs.md | 2 +- appendix/repo/redis.md | 4 +++- appendix/repo/wordpress.md | 5 +++-- 7 files changed, 19 insertions(+), 9 deletions(-) diff --git a/appendix/repo/centos.md b/appendix/repo/centos.md index 44db1ab..a17b2f5 100644 --- a/appendix/repo/centos.md +++ b/appendix/repo/centos.md @@ -3,7 +3,7 @@ ### 基本信息 [CentOS](https://en.wikipedia.org/wiki/CentOS) 是流行的 Linux 发行版,其软件包大多跟 RedHat 系列保持一致。 -该仓库位于 https://hub.docker.com/_/centos/,提供了 CentOS 从 5 ~ 7 各个版本的镜像。 +该仓库位于 https://hub.docker.com/_/centos/ ,提供了 CentOS 从 5 ~ 7 各个版本的镜像。 ### 使用方法 默认会启动一个最小化的 CentOS 环境。 @@ -56,3 +56,5 @@ LABEL name="CentOS Base Image" \ CMD ["/bin/bash"] ``` + + diff --git a/appendix/repo/mongodb.md b/appendix/repo/mongodb.md index 3ee4452..47304e8 100644 --- a/appendix/repo/mongodb.md +++ b/appendix/repo/mongodb.md @@ -3,7 +3,7 @@ ### 基本信息 [MongoDB](https://en.wikipedia.org/wiki/MongoDB) 是开源的 NoSQL 数据库实现。 -该仓库位于 https://hub.docker.com/_/mongo/,提供了 MongoDB 2.x ~ 3.x 各个版本的镜像。 +该仓库位于 https://hub.docker.com/_/mongo/ ,提供了 MongoDB 2.x ~ 3.x 各个版本的镜像。 ### 使用方法 默认会在 `27017` 端口启动数据库。 @@ -260,4 +260,5 @@ ENTRYPOINT ["/entrypoint.sh"] EXPOSE 27017 CMD ["mongod"] -``` \ No newline at end of file +``` + diff --git a/appendix/repo/mysql.md b/appendix/repo/mysql.md index de5b6b4..58f22f3 100644 --- a/appendix/repo/mysql.md +++ b/appendix/repo/mysql.md @@ -3,7 +3,7 @@ ### 基本信息 [MySQL](https://en.wikipedia.org/wiki/MySQL) 是开源的关系数据库实现。 -该仓库位于 https://hub.docker.com/_/mysql/,提供了 MySQL 各个版本的镜像,包括 5.6 系列、5.7 系列等。 +该仓库位于 https://hub.docker.com/_/mysql/ ,提供了 MySQL 各个版本的镜像,包括 5.6 系列、5.7 系列等。 ### 使用方法 默认会在 `3306` 端口启动数据库。 @@ -122,3 +122,5 @@ ENTRYPOINT ["/entrypoint.sh"] EXPOSE 3306 CMD ["mysqld", "--datadir=/var/lib/mysql", "--user=mysql"] ``` + + diff --git a/appendix/repo/nginx.md b/appendix/repo/nginx.md index ff88922..62455d2 100644 --- a/appendix/repo/nginx.md +++ b/appendix/repo/nginx.md @@ -3,7 +3,7 @@ ### 基本信息 [Nginx](https://en.wikipedia.org/wiki/Nginx) 是开源的高效的 Web 服务器实现,支持 HTTP、HTTPS、SMTP、POP3、IMAP 等协议。 -该仓库位于 https://hub.docker.com/_/nginx/,提供了 Nginx 1.0 ~ 1.11.x 各个版本的镜像。 +该仓库位于 https://hub.docker.com/_/nginx/ ,提供了 Nginx 1.0 ~ 1.11.x 各个版本的镜像。 ### 使用方法 下面的命令将作为一个静态页面服务器启动。 @@ -99,3 +99,5 @@ EXPOSE 80 443 CMD ["nginx", "-g", "daemon off;"] ``` + + diff --git a/appendix/repo/nodejs.md b/appendix/repo/nodejs.md index 55295a6..a2993b0 100644 --- a/appendix/repo/nodejs.md +++ b/appendix/repo/nodejs.md @@ -3,7 +3,7 @@ ### 基本信息 [Node.js](https://en.wikipedia.org/wiki/Node.js)是基于 JavaScript 的可扩展服务端和网络软件开发平台。 -该仓库位于 https://hub.docker.com/_/node/,提供了 Node.js 0.10 ~ 6.3.x 各个版本的镜像。 +该仓库位于 https://hub.docker.com/_/node/ ,提供了 Node.js 0.10 ~ 6.3.x 各个版本的镜像。 ### 使用方法 在项目中创建一个 Dockerfile。 diff --git a/appendix/repo/redis.md b/appendix/repo/redis.md index cadeefc..a3771e6 100644 --- a/appendix/repo/redis.md +++ b/appendix/repo/redis.md @@ -3,7 +3,7 @@ ### 基本信息 [Redis](https://en.wikipedia.org/wiki/Redis) 是开源的内存 Key-Value 数据库实现。 -该仓库位于 https://hub.docker.com/_/redis/,提供了 Redis 3.x 各个版本的镜像。 +该仓库位于 https://hub.docker.com/_/redis/ ,提供了 Redis 3.x 各个版本的镜像。 ### 使用方法 默认会在 `6379` 端口启动数据库。 @@ -139,3 +139,5 @@ ENTRYPOINT ["docker-entrypoint.sh"] EXPOSE 6379 CMD [ "redis-server" ] ``` + + diff --git a/appendix/repo/wordpress.md b/appendix/repo/wordpress.md index 1250db5..1bad0ab 100644 --- a/appendix/repo/wordpress.md +++ b/appendix/repo/wordpress.md @@ -3,7 +3,7 @@ ### 基本信息 [WordPress](https://en.wikipedia.org/wiki/WordPress) 是开源的 Blog 和内容管理系统框架,它基于 PhP 和 MySQL。 -该仓库位于 https://hub.docker.com/_/wordpress/,提供了 WordPress 4.x 版本的镜像。 +该仓库位于 https://hub.docker.com/_/wordpress/ ,提供了 WordPress 4.x 版本的镜像。 ### 使用方法 启动容器需要 MySQL 的支持,默认端口为 `80`。 @@ -114,4 +114,5 @@ COPY docker-entrypoint.sh /entrypoint.sh # grr, ENTRYPOINT resets CMD now ENTRYPOINT ["/entrypoint.sh"] CMD ["apache2-foreground"] -``` \ No newline at end of file +``` +