From 48a3624644412d3062e20611f11edd665f533bf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=B7=E6=80=80=E5=B8=85?= Date: Tue, 21 Nov 2017 19:05:06 +0800 Subject: [PATCH] Fix #216 #218 Fix #216 #218 --- .github/ISSUE_TEMPLATE.md | 2 +- .travis/Dockerfile | 26 ++++++++++++++++++++++++++ .travis/book.json | 30 ++++++++++++++++++++++++++++++ .travis/docker-compose.test.yml | 5 +++++ .travis/docker-entrypoint.sh | 19 +++++++++++++++++++ .travis/update.sh | 8 ++++++++ README.md | 14 +++++++++++++- docker-compose.yml | 11 +++++++++++ install/README.md | 13 +++++++------ install/ubuntu.md | 3 ++- revision.md | 5 ++--- 11 files changed, 124 insertions(+), 12 deletions(-) create mode 100644 .travis/Dockerfile create mode 100644 .travis/book.json create mode 100644 .travis/docker-compose.test.yml create mode 100755 .travis/docker-entrypoint.sh create mode 100755 .travis/update.sh create mode 100644 docker-compose.yml diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index c564724..aefc8b0 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -33,7 +33,7 @@ -* [x] 17.10 edge +* [x] 17.11 edge * [ ] 17.09 stable diff --git a/.travis/Dockerfile b/.travis/Dockerfile new file mode 100644 index 0000000..0a2315b --- /dev/null +++ b/.travis/Dockerfile @@ -0,0 +1,26 @@ +FROM node:9-alpine + +ENV TZ=Asia/Shanghai + +WORKDIR /srv/gitbook + +COPY book.json book.json + +COPY docker-entrypoint.sh /usr/local/bin/ + +RUN apk add --no-cache \ + tzdata \ + && npm install -g gitbook-cli \ + && gitbook install \ + && ln -s /usr/local/bin/docker-entrypoint.sh / \ + && rm -rf /root/.npm /tmp/* + +EXPOSE 4000 + +VOLUME /srv/gitbook-src + +WORKDIR /srv/gitbook-src + +ENTRYPOINT ["docker-entrypoint.sh"] + +CMD server diff --git a/.travis/book.json b/.travis/book.json new file mode 100644 index 0000000..e9e4ffe --- /dev/null +++ b/.travis/book.json @@ -0,0 +1,30 @@ +{ + "title": "Docker -- 从入门到实践", + "author": "yeasy", + "plugins": [ + "image-captions", + "github-buttons", + "page-treeview" + ], + "pluginsConfig": { + "image-captions": { + "attributes": { + "width": "600" + }, + "caption": "图 _PAGE_LEVEL_._PAGE_IMAGE_NUMBER_ - _CAPTION_" + }, + "github-buttons": { + "repo": "yeasy/docker_practice", + "types": [ + "star", + "watch" + ], + "size": "small" + }, + "page-treeview": { + "copyright": "Copyright © yeasy", + "minHeaderCount": "2", + "minHeaderDeep": "2" + } + } +} diff --git a/.travis/docker-compose.test.yml b/.travis/docker-compose.test.yml new file mode 100644 index 0000000..2e0c117 --- /dev/null +++ b/.travis/docker-compose.test.yml @@ -0,0 +1,5 @@ +sut: + build: . + volumes: + - ../:/srv/gitbook-src + command: build diff --git a/.travis/docker-entrypoint.sh b/.travis/docker-entrypoint.sh new file mode 100755 index 0000000..7302ef3 --- /dev/null +++ b/.travis/docker-entrypoint.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +START=`date "+%F %T"` + +if [ $1 = "sh" ];then sh ; exit 0; fi + +rm -rf node_modules _book + +cp -a . ../gitbook + +cd ../gitbook + +main(){ + if [ "$1" = build ];then gitbook build; cp -a _book ../gitbook-src; echo $START; date "+%F %T"; exit 0; fi + gitbook serve + exit 0 +} + +main $1 $2 $3 diff --git a/.travis/update.sh b/.travis/update.sh new file mode 100755 index 0000000..7139343 --- /dev/null +++ b/.travis/update.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +# cd .travis +# ./update.sh + +if [ ! -f Dockerfile ];then exit 1; fi + +cp -a ../book.json book.json diff --git a/README.md b/README.md index 3b7f856..901b9ec 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,19 @@ * pdf 版本 [下载](https://www.gitbook.com/download/pdf/book/yeasy/docker_practice) * epub 版本 [下载](https://www.gitbook.com/download/epub/book/yeasy/docker_practice) -Docker 自身仍在快速发展中,生态环境也在蓬勃成长。建议初学者使用 Linux 上最新版的 Docker (v17.10.0) 进行学习实践。欢迎参与维护项目:[如何贡献](.github/CONTRIBUTING.md)。 +离线阅读: + +```bash +$ git clone --depth=1 https://github.com/yeasy/docker_practice.git + +$ cd docker_practice + +$ docker-compose pull + +$ docker-compose up +``` + +Docker 自身仍在快速发展中,生态环境也在蓬勃成长。建议初学者使用 Linux 上最新版的 Docker (v17.11) 进行学习实践。欢迎参与维护项目:[如何贡献](.github/CONTRIBUTING.md)。 * [修订记录](revision.md) * [贡献者名单](https://github.com/yeasy/docker_practice/graphs/contributors) diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2891d75 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: "3" +services: + + docker_practice: + build: ./.travis + image: yeasy/docker_practice:latest + ports: + - 4000:4000 + volumes: + - ./:/srv/gitbook-src + command: server diff --git a/install/README.md b/install/README.md index c81c9cb..355c4f3 100644 --- a/install/README.md +++ b/install/README.md @@ -2,12 +2,13 @@ Docker 在 1.13 版本之后,从 2017 年的 3 月 1 日开始,版本命名规则变为如下: -项目 | 说明 ---------------- | ------- -版本格式 | YY.MM -stable 版本 | 每个季度发行 -edge 版本 | 每个月发行 -当前 Docker CE 版本 | 17.10.0 +|项目 | 说明 | +|: --------------- | : ------- | +|版本格式 | YY.MM | +|Stable 版本 | 每个季度发行 | +|Edge 版本 | 每个月发行 | +|当前 Docker CE Stable 版本 | 17.09 | +|当前 Docker CE Edge 版本 | 17.11 | 同时 Docker 划分为 CE 和 EE。CE 即社区版(免费,支持周期三个月),EE 即企业版,强调安全,付费使用。 diff --git a/install/ubuntu.md b/install/ubuntu.md index fb87873..81dd517 100644 --- a/install/ubuntu.md +++ b/install/ubuntu.md @@ -6,7 +6,8 @@ Docker CE 支持以下版本的 [Ubuntu](https://www.ubuntu.com/server) 操作系统: -* Zesty 17.04 +* Artful 17.10 (Docker CE 17.11 Edge) +* Zesty 17.04 * Xenial 16.04 (LTS) * Trusty 14.04 (LTS) diff --git a/revision.md b/revision.md index 0b54e82..80c259a 100644 --- a/revision.md +++ b/revision.md @@ -1,7 +1,8 @@ ## 主要修订记录 -* 0.9.0: 2017-XX-YY +* 0.9.0: 2017-12-31 + * 根据最新版本(v17.11)修订内容 * 完善 Compose 项目 * 更新 Swarm 项目 * 更新 Mesos 项目 @@ -60,5 +61,3 @@ * 添加基本内容; * 修正错别字和表达不通顺的地方。 - -