Compare commits

...

889 Commits
v0.7 ... master

Author SHA1 Message Date
Baohua Yang
3a9d4bff61
Merge pull request #549 from CNAHYZ/patch-1
Update figure's path
2024-12-25 19:49:09 -08:00
intfoo
4bc29c0300
Update overview.md 修复图片地址问题 2024-12-25 16:20:30 +08:00
Kang Huaishuai
65bc905920 Update registry mirror 2024-11-23 23:23:50 +08:00
Baohua Yang
1b7d941fcd
Merge pull request #548 from trevanlye/patch-1
Add go init
2024-11-20 10:17:28 -08:00
Baohua Yang
e0ff3d315a
Merge pull request #542 from upbeat-backbone-bose/master
Update django version
2024-11-20 10:16:04 -08:00
trevanlye
09de77b543
Update README.md
we need 'go mod init first' before 'go get'
2024-11-11 11:05:23 +08:00
debian-go
344fc8bd3c
Merge branch 'yeasy:master' into master 2024-11-08 11:42:06 +08:00
Baohua Yang
7ec5772432
Merge pull request #546 from liangbinfudan/master
ubuntu.md update #545
2024-09-26 16:38:42 -07:00
Hugo Dock
355dd3b051
Update ubuntu.md
The relationships among Ubuntu LTS versions have been described, and the relevant scripts have been modified slightly
2024-09-19 13:09:38 +08:00
Baohua Yang
ca011164c2
Merge pull request #543 from my-vegetable-has-exploded/debian11
Add suggestion for gpg in debian11
2024-07-30 14:02:19 -07:00
yi wang
0f2956a646
Update debian.md 2024-07-29 22:25:02 +08:00
debian-go
da7991660e
Merge pull request #1 from upbeat-backbone-bose/dependabot/pip/compose/demo/django/pip-062e67ef1e
Update django requirement from <3.0,>=2.0 to >=5.0.6,<6.0 in /compose/demo/django in the pip group across 1 directory
2024-07-09 10:26:30 +08:00
dependabot[bot]
391c6364a0
Update django requirement
Updates the requirements on [django](https://github.com/django/django) to permit the latest version.

Updates `django` to 5.0.6
- [Commits](https://github.com/django/django/compare/2.0...5.0.6)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-09 02:26:13 +00:00
Baohua Yang
99433b2e45
Merge pull request #540 from RockChinQ/master
Add error solution for docker installation on raspi OS
2024-02-03 19:46:31 -08:00
RockChinQ
32c6a91aa9 doc(raspberry-pi): tested on bookworm 2024-02-02 23:03:39 +08:00
RockChinQ
bea7b8d3f4 doc(raspberry-pi.md): error solution for bullseye 2024-02-02 10:36:14 +08:00
Baohua Yang
1be1db5a43
Merge pull request #538 from CybCom/master
Fix CI error
Close issue #537
2023-12-29 16:27:59 -08:00
CybCom
7052cea8a3
refactor(workflows): 💚 Update the YAMLs for GitHub workflows
Update the out dated action version. Remove redundant/useless lines. Some other updates.
2023-12-23 01:01:32 +08:00
CybCom
584087ad46
ci(workflows): 💚 Try to confirm and fix CI error:0308010C
There might be a conflict between the new version node.js and this project's dependencies, according to CI Error message "error:0308010C:digital envelope routines::unsupported". Try to confirm and fix it by specifying the old styled openssl.
2023-12-22 18:27:38 +08:00
Baohua Yang
dd6b022429
Merge pull request #536 from CybCom/master
Fix expression of using init
2023-12-20 14:43:33 -08:00
CybCom
46020ff786
fix(image\dockerfile\cmd.md): 🐛 Fix issue yeasy#535, 改进对issue进程的提法
fix(image): CMD指令讲解中,”则是希望 upstart 来以后台守护进程形式启动 nginx 服务“,鉴于当前多种init程序(特别是以systemd为代表的)的流行,改为  ”则是希望 init 系统以后台守护进程的形式启动 nginx 服务“

Issue #535: 关于init进程的提法改进
2023-12-21 01:06:07 +08:00
Baohua Yang
3ccba8afb4
Merge pull request #533 from lxg199788/patch-1
Update aliyun mirror configuration
2023-10-25 14:40:38 -07:00
lxg
f5e6a67664
Update aliyun mirror configuration.md
Update aliyun mirror configuration to the lastest version
2023-10-23 09:56:14 +08:00
Baohua Yang
439264a87f
Merge pull request #530 from hellozrh/dev1
Fix rpm installation
2023-08-17 21:55:29 -07:00
hellozrh
41558e73b4
修复离线rpm包安装方式,解决各个rpm包先后依赖安装顺序不一致导致安装失败的问题。
修复离线rpm包安装方式,解决各个rpm包先后依赖安装顺序不一致导致安装失败的问题。
2023-08-17 16:15:16 +08:00
Baohua Yang
f34a985a78
Merge pull request #529 from hellozrh/hellozrh-patch
Fix installation steps when offline
2023-08-01 17:49:18 -07:00
hellozrh
bd8387083a
Update to newer version of docker installation. 2023-07-29 16:32:28 +08:00
hellozrh
8d129d0ead
修复离线安装时依赖包下载、离线rpm包安装依赖先后顺序的问题。 2023-07-19 15:20:16 +08:00
Baohua Yang
85c5a280a4
Merge pull request #527 from hezhizhen/patch-2
Update install
2023-07-03 17:21:20 -07:00
Zhizhen He
98044d04b2
Update install 2023-07-03 10:54:23 +08:00
Kang Huaishuai
57873b1143
Merge pull request #523 from wushu037/patch-1
Update volume.md
2023-05-15 08:58:42 +08:00
无数
6acf209b9a
Update volume.md
Correct confusing words
2023-05-07 21:34:34 +08:00
Kang Huaishuai
ed4b3efd3b
Merge pull request #520 from ReginaldChen/patch-1
修改错别字
2023-02-27 08:10:33 +08:00
ReginaldChen
eb327bf908
修改错别字
轮寻应为轮询
2023-02-24 17:41:22 +08:00
Baohua Yang
cc683fdb56
Merge pull request #519 from docete/issue-518
Add docs of using HTTP/HTTPS proxy

Close #518
2023-01-17 12:03:57 -08:00
Gao Zhenghua
13b8e12f44 [issue-518] Add document on how to use HTTP/HTTPS proxy 2023-01-16 16:13:20 +08:00
Kang Huaishuai
ce4428adfb
Merge pull request #517 from hezhizhen/patch-1
fix: typo
2023-01-08 20:04:47 +08:00
Zhizhen He
6443ddc07c
fix: typo 2023-01-07 23:45:41 +08:00
Kang Huaishuai
ce5ae6a360
Merge pull request #515 from kingyue737/patch-1
fix: typo
2022-12-22 15:39:38 +08:00
Kang Huaishuai
35b264694b
Merge pull request #516 from kingyue737/patch-2
fix: wrong key of registry mirrors
2022-12-22 15:39:14 +08:00
Yue JIN
e76b0b66a0
fix: wrong key of registry mirrors 2022-12-21 20:32:46 +08:00
Yue JIN
d80f3430b2
fix: typo 2022-12-21 19:38:21 +08:00
Baohua Yang
d9c5d2fb43
Merge pull request #514 from Hazel-Lin/install/mac
Update macos requirement in doc
2022-11-11 18:15:38 -08:00
linhuizi
fe7530c3f6 docs(install): 修改Mac安装系统要求 2022-11-11 11:31:02 +08:00
Baohua Yang
30f00323e0
Merge pull request #512 from WitchElaina/master
fix words
2022-10-22 11:29:13 -07:00
WitchElaina
93ea51ff07
修改语病
原句:“这也是为什么有人认为 Go 是特别适合容器微服务架构的语言的原因之一”中的“为什么”和“的原因”重复赘余,因此删除掉“为什么”确保本句语法正确。
2022-10-22 15:42:59 +08:00
Baohua Yang
85be3008fa
Update words
Fix #501
2022-05-12 14:37:08 -07:00
Baohua Yang
88f9183fd5
Merge pull request #500 from mrnyg/patch-1
Enable non-root read mod
2022-04-11 10:06:43 -07:00
mrnyg
1c4a43e34e
Update secret.md
apache工作进程是www-data用户运行,而密钥文件(/run/secrets/wp_db_password)的属主是root,导致apache工作进程无法读取密钥,从而无法连接数据库
2022-04-09 14:27:53 +08:00
Baohua Yang
7014e4d87c
Create FUNDING.yml 2022-03-16 15:14:06 -07:00
Kang Huaishuai
18028b8eaa
Update dockerhub autobuild
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2022-02-24 21:08:22 +08:00
Kang Huaishuai
7c78d1c256
centos refer to centos:8, deprecated
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2022-02-24 21:06:15 +08:00
Baohua Yang
d4c6e590c6
Merge pull request #497 from npmmirror/master
Update https://registry.npm.taobao.org to https://registry.npmmirror.com
2022-02-16 11:50:56 -08:00
NPM Mirror Bot
1e415ac76c update https://registry.npm.taobao.org to https://registry.npmmirror.com 2022-02-11 22:09:47 -05:00
NPM Mirror Bot
664ac88c85 update https://registry.npm.taobao.org to https://registry.npmmirror.com 2022-02-11 13:56:55 +00:00
Kang Huaishuai
734079661d
Merge pull request #496 from smartlixx/patch-1
Update best_practices.md
2022-01-04 11:01:18 +08:00
Xianxiang Li
1ed8c2c81f
Update best_practices.md
Fix a typo
2022-01-04 10:41:51 +08:00
Baohua Yang
b9455b2169 Fix format 2021-12-01 14:58:32 -08:00
Baohua Yang
10a77adbe6
Merge pull request #495 from Dup4/master
Remove duplicated words
2021-11-07 16:37:20 -08:00
Dup4
31f3540fbc
fix: typo 2021-11-01 19:27:25 +08:00
Kang Huaishuai
d5ce7f048b
Update DD download link
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-09-19 18:28:22 +08:00
Kang Huaishuai
a613c78c33
[Drone] update to v2
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-09-19 17:58:20 +08:00
Kang Huaishuai
d1d4f0f47d
Update link
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-07-16 12:46:38 +08:00
Kang Huaishuai
d4fc0a9da1
remove deprecated features: machine and swarm
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-07-16 12:43:50 +08:00
Kang Huaishuai
8dfdbc5b07
remove docker search
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-07-16 12:33:01 +08:00
Kang Huaishuai
5caddf4413
[Kubernetes] kubeadm cri based containerd
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-07-16 12:25:33 +08:00
Kang Huaishuai
95aed0099e
Update minio case
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-07-15 13:29:08 +08:00
Kang Huaishuai
533f30a939
Update dead url
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-07-06 23:21:53 +08:00
Kang Huaishuai
1787c392c6
Update os version requirement
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-07-06 23:12:55 +08:00
Kang Huaishuai
ca29ab51b1
Update SUMMARY.md
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-07-05 00:35:13 +08:00
Kang Huaishuai
64b75e997f
Update project compose file
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-06-27 22:34:53 +08:00
Kang Huaishuai
31ea892dfc
Update aliyun mirror
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-06-27 18:03:05 +08:00
Kang Huaishuai
985e295d70
Add compose v2
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-06-12 23:26:44 +08:00
Kang Huaishuai
330beb4fdb
don't push pages to coding.net
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-06-06 20:19:28 +08:00
Kang Huaishuai
baeb222455
Update vuepress config
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-06-06 11:10:01 +08:00
Kang Huaishuai
8705cede17
Update jd.com link
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-05-31 19:42:07 +08:00
Kang Huaishuai
ba36c90b6c
Update vuepress config
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-05-31 19:23:39 +08:00
Kang Huaishuai
96fc5acc75
Update laravel demo
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-05-28 21:50:15 +08:00
Kang Huaishuai
6cfc12eece
cli experimental is deprecated on 20.10
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-04-18 19:11:47 +08:00
Kang Huaishuai
da614e8441
Update link
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-03-20 11:22:13 +08:00
Kang Huaishuai
1e577a8c6f
Update hello-world example
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-03-14 21:42:50 +08:00
Kang Huaishuai
9fe6c356f0
Remove us-en url
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-03-12 00:15:47 +08:00
Kang Huaishuai
aa08e32003
Update repository
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-03-12 00:12:47 +08:00
Kang Huaishuai
bc43b30964
Update image 2021-03-11 23:09:37 +08:00
Kang Huaishuai
7afb8991d3
Update install
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-03-11 21:27:50 +08:00
Kang Huaishuai
6f810c89f3
Update cmd result
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-03-07 23:56:19 +08:00
Kang Huaishuai
0a87d2a643
Update container markdown format
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-03-07 23:54:43 +08:00
Kang Huaishuai
8dd3141c57
Update format
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-03-07 23:51:02 +08:00
Kang Huaishuai
ce48a157d5
Update registry
* remove dtr
* add ghcr.io

Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-03-07 22:36:48 +08:00
Kang Huaishuai
ea00e0d82a
Update format
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-03-07 15:29:05 +08:00
Kang Huaishuai
5ebd6fb6f8
Update brew command, fixed #484
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-03-06 11:02:43 +08:00
Kang Huaishuai
6265d0274b
[vuepress] Update version
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2021-03-06 11:02:42 +08:00
Kang Huaishuai
d1480092bf
Merge pull request #482 from GFZRZK/patch-1
fix wrong cmd
2021-01-19 23:47:07 +08:00
WC
d414505835
fix wrong cmd
fix wrong cmd
2021-01-11 18:14:38 +08:00
Kang Huaishuai
aa3d56fce9
remove travis ci
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-12-20 23:22:30 +08:00
Kang Huaishuai
2cd0fac44b
remove mesos
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-12-20 22:58:09 +08:00
Kang Huaishuai
fb162df033
remove project travis ci
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-12-20 22:48:54 +08:00
Kang Huaishuai
cc726421c8
Update compose version
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-12-20 22:18:08 +08:00
Kang Huaishuai
47e83e7aa3
docker v20.10.0 released
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-12-20 22:10:25 +08:00
Kang Huaishuai
da10b3a7a1
remove docker desktop edge channel
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-12-11 22:00:57 +08:00
Kang Huaishuai
9d62668fcf
close #479
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-12-09 23:49:26 +08:00
Kang Huaishuai
da09321b0e
close #478
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-11-21 20:43:00 +08:00
Kang Huaishuai
2b7f954c65
[install] use aliyun mirror
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-11-09 17:38:22 +08:00
Kang Huaishuai
7b5a21bf6d
[install] Update debian
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-11-03 15:42:09 +08:00
Kang Huaishuai
e8d45d3be9
[install] Update outdated content
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-11-03 13:04:28 +08:00
Kang Huaishuai
7d51bacb12
[compose] Remove outdated content
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-11-02 18:57:51 +08:00
Kang Huaishuai
00274b0615
Update Dockerfile USER,close #473
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-11-02 17:46:43 +08:00
Kang Huaishuai
0b1812aac8
Update fcos
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-11-02 10:33:27 +08:00
Kang Huaishuai
17ad494537
remove outdated content
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-10-22 08:46:09 +08:00
Kang Huaishuai
8e8126756a
[vuepress] Fixed https://github.com/Mister-Hope/vuepress-theme-hope/issues/406 2020-10-16 12:13:14 +08:00
Kang Huaishuai
f9182e5d19
[vuepress] bump 1.7.0
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-10-15 18:30:34 +08:00
Kang Huaishuai
0fdc2d64a9
based Docker v20.10
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-10-14 23:33:32 +08:00
Kang Huaishuai
bcc901ac9f
[install] Docker 20.10 beta support CentOS 8
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-10-14 23:30:27 +08:00
Kang Huaishuai
47ec0e2ab8
[vuepress] bump 1.6.0
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-10-14 13:47:42 +08:00
Kang Huaishuai
c572a399f3
[vuepress] Update config
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-10-14 11:52:48 +08:00
Kang Huaishuai
fd85d5a0e5
project docker image add bash
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-10-14 00:40:07 +08:00
Kang Huaishuai
1b2c480a55
Add vscode devcontainer
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-10-14 00:28:50 +08:00
Kang Huaishuai
fc8b8867af
[vuepress] Update config
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-10-13 22:41:28 +08:00
Kang Huaishuai
ff1f48a793
Update mirror: check docker.service first
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-10-13 09:35:40 +08:00
Kang Huaishuai
4751e59a6f
rename docker ce to docker
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-10-12 18:54:47 +08:00
Kang Huaishuai
f6ec3b23d2
Update mirror
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-10-10 09:35:45 +08:00
Kang Huaishuai
1c932ef567
Fixed link
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-10-07 13:44:57 +08:00
Kang Huaishuai
68d85ac31e
Update laravel, close #465 2020-10-07 13:31:45 +08:00
Kang Huaishuai
83929dd096
[vuepress] support dark mode, close #463
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-09-16 18:05:52 +08:00
Kang Huaishuai
d071ed7b99
Fixed 404 link 2020-09-16 17:40:22 +08:00
Kang Huaishuai
58c09788f6
Add link
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-09-06 21:04:01 +08:00
Kang Huaishuai
cbaa24c48f
Dockerfile add shell label
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-09-06 20:16:04 +08:00
Kang Huaishuai
5d91c5a39f
replace ip.cn
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-09-06 17:43:21 +08:00
Kang Huaishuai
48785525e0
Fixed kubeadm error
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-09-06 14:18:12 +08:00
Kang Huaishuai
6fcf302809
Update format
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-09-06 10:14:38 +08:00
Kang Huaishuai
4f08e73bfe
[install] Update CentOS8
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-09-06 10:06:15 +08:00
Kang Huaishuai
4f7b448f0c
[install] remove nightly version
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-09-06 09:51:53 +08:00
Kang Huaishuai
c1c7a7981d
Fixed 301 link
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-09-06 09:40:55 +08:00
Kang Huaishuai
cc210f75a7
[install] Update CentOS8
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-09-06 09:30:17 +08:00
Kang Huaishuai
b0ccb74dbd
[install] Add CentOS 8
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-09-06 09:15:03 +08:00
Kang Huaishuai
90a7316322
buildkit more arg 2020-09-06 08:53:11 +08:00
Kang Huaishuai
6ceeec7f45
Merge pull request #462 from jackeylu/master
fix #461 https://github.com/yeasy/docker_practice/issues/461#issue-69…
2020-09-04 14:34:16 +08:00
jackeylv
d1e303d139 fix #461 https://github.com/yeasy/docker_practice/issues/461#issue-692771052
Signed-off-by: jackeylv <lvlin.whu@qq.com>
2020-09-04 14:24:36 +08:00
Kang Huaishuai
4b70a27151
link-check exclude ip.cn
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-08-29 15:46:24 +08:00
Kang Huaishuai
e021b27323
registry image not include htpasswd
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-08-29 15:30:32 +08:00
Kang Huaishuai
eac2a57633
Update vuepress nav
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-08-27 23:09:11 +08:00
Kang Huaishuai
c25c7283cf
remove opensource
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-08-25 19:42:35 +08:00
Kang Huaishuai
4682ba336f
improve content
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-08-25 18:01:53 +08:00
Kang Huaishuai
ee26243625
use nginx:alpine as demo
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-08-25 16:54:59 +08:00
Kang Huaishuai
5fb17c90e0
Merge pull request #460 from myccccccc/master
Fix issue #459
2020-08-25 15:53:33 +08:00
mayingchun
6eb603a33b Fix issue #459 2020-08-25 14:19:23 +08:00
Kang Huaishuai
9bc245dfdc
[Windows] v1903+ support WSL2
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-08-22 09:38:34 +08:00
Kang Huaishuai
9a4660492c
ip.cn not support https
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-08-10 13:43:33 +08:00
Kang Huaishuai
edf1a3a07b
remove outdated content #458
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-08-10 13:41:36 +08:00
Kang Huaishuai
acb8662c43
wechat is first
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-08-10 13:40:04 +08:00
Kang Huaishuai
85b2325513
Update link
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-07-31 10:08:01 +08:00
Kang Huaishuai
cf7d53dc9c
Merge pull request #456 from huiyifyj/master
Add "到" the word to read more fluently
2020-07-30 10:04:07 +08:00
huiyifyj
83fbb87fd1
Add the word to read more fluently 2020-07-30 09:26:49 +08:00
Kang Huaishuai
61bda4b259
Fixed docker image
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-07-14 16:58:22 +08:00
Kang Huaishuai
c815720349
Update image link
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-07-14 16:20:36 +08:00
Kang Huaishuai
4aa20ecce3
Update actions 301 link
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-07-14 00:09:11 +08:00
Kang Huaishuai
6efe0297fe
Remove download link #455
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-07-14 00:08:15 +08:00
Kang Huaishuai
6c668a94df
Update README
调整章节顺序

Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-07-04 13:02:37 +08:00
Kang Huaishuai
911ce1a2e4
Fixed #454
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-07-03 12:19:36 +08:00
Kang Huaishuai
8b186fb7e7
[windows] install by winget
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-06-22 09:22:53 +08:00
Kang Huaishuai
139b0ca65c
Update raspberry os name
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-06-17 18:50:33 +08:00
Kang Huaishuai
67213bc2f5
Update ide content
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-06-17 10:00:47 +08:00
Kang Huaishuai
d4d09f5154
docker hub support buildx
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-06-17 00:42:01 +08:00
Kang Huaishuai
f0568ebffd
Update install content
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-06-17 00:10:09 +08:00
Kang Huaishuai
ddec6641b9
Merge pull request #451 from staticdax/master
Fix Typo issue #450: "运用"疑似笔误
2020-05-20 11:27:43 +08:00
staticdax
4d3d2d21fe fix typo: "运用"疑似笔误 2020-05-20 01:35:47 +08:00
Kang Huaishuai
f580130be0
Add baidu registry mirror
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-05-11 19:01:06 +08:00
Kang Huaishuai
acc5c6e723
Add link
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-05-10 10:43:51 +08:00
Kang Huaishuai
1316e41222
offline read image use cn mirror image
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-05-10 09:46:27 +08:00
Kang Huaishuai
9cfd1fda2b
offline read docker image add tips
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-05-10 09:46:27 +08:00
Kang Huaishuai
683cf95ca7
build vuepress docker image
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-05-10 09:46:11 +08:00
Kang Huaishuai
8952dee0a8
Merge pull request #448 from niebayes/master
Fix issue #447: 删除了一个多余的"对" (line 97)
2020-05-08 19:44:52 +08:00
Nie Shicong
bdc8bd618c Fix issue #447: 删除了一个多余的"对" (line 97)
Signed-off-by: Nie Shicong <bayes@Nies-MacBook-Pro.local>
2020-05-08 19:20:23 +08:00
Baohua Yang
41da49b127 Migrating to new gitbook link 2020-04-29 11:36:50 -07:00
Kang Huaishuai
18ab3069a3
Update soft to latest version
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-04-26 10:34:02 +08:00
Kang Huaishuai
0fd981acc2
[buildx] buildkit image support tencent cloud env
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-04-26 10:17:19 +08:00
Kang Huaishuai
4561243c23
FCOS live iso require 3GB RAM
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-04-26 09:57:39 +08:00
Kang Huaishuai
ff28d7219d
Recommit (#446)
* 添加离线部署docker和离线部署minio实践

Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>

Co-authored-by: Daiwj <daiwj@zz3s.com>
2020-04-26 09:42:59 +08:00
Daiwj
34b6b617b9 docker镜像的导入和导出修改了章节名字 2020-04-12 19:13:38 +08:00
Kang HuaiShuai
e0797515d3
Update buildx image
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-04-07 09:18:40 +08:00
Kang HuaiShuai
a691aa607a
remove azk8s.cn mirror
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-04-04 22:54:32 +08:00
Kang Huaishuai
e9dc8dc974
Merge pull request #443 from boblau8686/master
Correct the wrong word
2020-03-31 18:32:40 +08:00
bob.liu
44fdf58ba5 Correct the wrong word 2020-03-31 18:23:17 +08:00
Kang HuaiShuai
bd74c85bb7
gitbook dist commit message include main repo sha
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-03-12 15:07:44 +08:00
Kang HuaiShuai
e38ea82f37
remove github actions files on gitbook dist
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-03-12 15:04:21 +08:00
Kang HuaiShuai
c887661c08
Add docker roadmap
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-03-12 14:50:34 +08:00
Kang HuaiShuai
fced7854ee
Fixed #440 on fedora
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-03-12 14:47:09 +08:00
Touko
e4a68ea7e4
Fix issue #440
http://mirrors.ustc.edu.cn/help/docker-ce.html#id7
2020-03-12 14:23:20 +08:00
Kang HuaiShuai
d8e5cfe097
Update install
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-03-10 14:24:46 +08:00
Kang HuaiShuai
5634eb2fda
Update aliyun customer case
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-03-10 14:08:20 +08:00
Kang HuaiShuai
c720d6959e
Docker Desktop Support Windows Home
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-03-10 13:39:27 +08:00
Kang HuaiShuai
3a24901664
Change AUFS to OverlayFS
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-03-04 11:50:59 +08:00
Kang HuaiShuai
ca5502e208
Update alpine content: replace default repo
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-02-27 23:31:01 +08:00
Kang HuaiShuai
d2f5e120ae
Fixed github pages
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-02-23 21:57:26 +08:00
Kang HuaiShuai
d887c8bda6
Update link
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-02-23 21:17:32 +08:00
Kang HuaiShuai
1e026fb3a1
Remove 404 link
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-02-23 11:36:56 +08:00
Kang HuaiShuai
33c2b2216d
[actions] check md files link
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-02-23 11:15:11 +08:00
Kang HuaiShuai
6c0fc9e416
cp _images to vuepress dist
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-02-23 10:53:24 +08:00
Kang HuaiShuai
a2e8595c42
vuepress remove archived content
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-02-22 14:59:31 +08:00
Kang HuaiShuai
5577c9caa6
Change CoreOS to Fedora CoreOS(FCOS)
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-02-22 13:55:13 +08:00
Kang Huaishuai
2f46c5180c
Merge pull request #439 from firejq/patch-1
Fix a markdown grammatical error
2020-02-11 08:57:29 +08:00
FirejqWei
9a0a76a5bb
Fix a markdown grammatical error 2020-02-11 02:03:57 +08:00
Kang HuaiShuai
9d450ffc26
[Compose] Add lnmp
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-01-09 17:08:35 +08:00
Kang HuaiShuai
e77c9ecbab
[Kubernetes] Add dashboard
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2020-01-09 16:57:38 +08:00
Kang HuaiShuai
386b1e4cf6
Replace dead link
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-12-31 21:10:06 +08:00
Kang HuaiShuai
9f0b2c725f
Add podman
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-12-31 20:53:51 +08:00
Kang HuaiShuai
0dcc67da1c
Add kubeadm, close #438
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-12-31 20:26:22 +08:00
Kang HuaiShuai
bbfe14e0af
Update docker commit, Fixed #437 2019-12-26 11:54:45 +08:00
Kang Huaishuai
59317624bb
Update link 2019-12-22 10:34:52 +08:00
Kang HuaiShuai
2092debcc0
[Cloud] Remove docker cloud
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-12-09 21:00:18 +08:00
Kang HuaiShuai
3ba77a7470
Drone agent use drone/drone-runner-docker:1
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-12-09 20:46:21 +08:00
Kang HuaiShuai
fbfab11293
Update registry mirror
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-12-09 15:05:06 +08:00
Kang HuaiShuai
f940d22950
Add CODEOWNERS
* https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners

Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-12-09 14:28:18 +08:00
Kang HuaiShuai
a601a83c0e
Update vuepress
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-12-09 13:40:10 +08:00
Kang HuaiShuai
0ac24829e1
Add enable kubernetes on docker-sektop,close #262
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-12-09 12:21:52 +08:00
Kang HuaiShuai
a85ae7da1e
Fixed buildx 2019-12-01 10:12:14 +08:00
Kang HuaiShuai
83619ad6e3
[Public] coding.net domain is *.mirror.docker-practice.com
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-11-29 23:36:58 +08:00
Kang Huaishuai
8e38beee0e
Merge pull request #432 from loopever/master
Fix issue #431: AUFS全称修改为Wikipedia的内容
2019-11-26 19:50:29 +08:00
loopever
c574178a02 Fix issue #431: AUFS全称修改为Wikipedia的内容 2019-11-26 18:56:12 +08:00
Kang Huaishuai
e02f015a23
Fixed #430 2019-11-18 22:32:44 +08:00
Kang HuaiShuai
fde5496bb8
Update kubernetes
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-11-15 11:04:23 +08:00
Kang HuaiShuai
e1961d62eb
Fixed 404 link
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-11-14 09:22:06 +08:00
Kang HuaiShuai
c836c65a78
Update command
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-11-14 09:21:31 +08:00
Kang HuaiShuai
5cb92f63cf
Update title style
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-11-06 14:58:03 +08:00
Kang HuaiShuai
99e470eb2a
Update link
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-11-06 14:36:28 +08:00
Kang HuaiShuai
61492ff11a
[vuepress] push dist to coding.net
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-11-06 13:18:55 +08:00
Kang HuaiShuai
6f96aaf5a6
[CI] Fixed actions
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-11-06 10:44:57 +08:00
Kang HuaiShuai
709c77adcb
Update title style
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-11-05 23:35:43 +08:00
Kang HuaiShuai
3ba7560b4d
Add experimental
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-11-05 23:28:01 +08:00
Kang HuaiShuai
f44a3ee402
Add ide with docker
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-11-05 22:19:50 +08:00
Kang HuaiShuai
eb274b16f6
Add Docker Buildx
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-11-05 21:50:05 +08:00
Kang HuaiShuai
fadf84bb69
Archive docker-machine mesos docker-swarm, close #425
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-11-05 19:35:12 +08:00
Kang HuaiShuai
c788212aad
Use vuepress build book
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-11-05 19:15:33 +08:00
Kang Huaishuai
7690686ddb
Merge pull request #423 from uscwifi/patch-1
Update centos.md
2019-10-05 23:41:21 +08:00
uscwifi
a3647ec3a3
Update centos.md 2019-10-05 23:18:48 +08:00
Kang HuaiShuai
008f01592b
Update docker hub
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-09-25 11:04:01 +08:00
Kang HuaiShuai
3923858f00
Update format
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-09-25 11:00:57 +08:00
Kang HuaiShuai
b11cac80fb
[Registry Mirror] Update mirror
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-09-25 10:49:40 +08:00
Kang HuaiShuai
38e810a407
[install] Fixed script install, default channel is stable
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-09-25 10:30:12 +08:00
Kang HuaiShuai
224fbe9fed
Fixed outdated content
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-09-20 16:51:04 +08:00
Kang HuaiShuai
f260e3ba88
Add wechat group
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-09-20 16:50:32 +08:00
Kang HuaiShuai
f17f29bf41
Update format
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-09-20 15:29:02 +08:00
Kang HuaiShuai
21a811d265
[install] Fixed error
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-09-20 15:05:06 +08:00
Kang HuaiShuai
803b93c1fc
Update format
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-09-20 14:48:54 +08:00
Kang HuaiShuai
4873267f31
Update format
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-09-20 14:28:50 +08:00
Kang HuaiShuai
1aef2b7734
[cases] Fixed typo
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-09-20 14:12:56 +08:00
Kang HuaiShuai
49ef715e99
[install] Update settings
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-09-20 14:06:04 +08:00
Kang HuaiShuai
dd060d026a
add docker-practice.com
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-09-05 13:40:53 +08:00
Kang HuaiShuai
96aa9b99de
deploy pages to docker-practice/zh-cn
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-09-05 12:59:25 +08:00
Kang Huaishuai
4e84715725 Fixed error 2019-09-01 20:06:13 +08:00
Kang
48718d6035 Fixed error
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2019-09-01 15:15:53 +08:00
khs1994
8666d2683f Update Docker Desktop name
Signed-off-by: khs1994 <khs1994@khs1994.com>
2019-09-01 15:03:32 +08:00
khs1994
84c2183cc8 [Machine] Update to v0.16.1
Signed-off-by: khs1994 <khs1994@khs1994.com>
2019-09-01 14:50:40 +08:00
khs1994
7ec38273bb [Compose] Update to v1.24.1
Signed-off-by: khs1994 <khs1994@khs1994.com>
2019-09-01 14:46:33 +08:00
khs1994
6bca9e8dff Update CoreOS: remove outdated quickstart 2019-09-01 14:16:10 +08:00
khs1994
6c6d2ac973 [etcd] Update to v3.4.x 2019-08-31 22:57:43 +08:00
khs1994
8747860b95 compose wordpress update mysql to v8.0.x #415 2019-08-31 22:11:34 +08:00
khs1994
5a00a6b32f Update CI
* Update drone to v1.x
* Add GitHub Actions
2019-08-31 21:15:51 +08:00
khs1994
8a3be4634e Update install 2019-08-31 18:35:14 +08:00
khs1994
c075122492 Update project docker image name #416 2019-08-31 17:47:38 +08:00
Kang Huaishuai
593a0c39ff
Merge pull request #413 from baijunyao/master
Use aliyun compose mirrors
2019-08-14 22:06:45 +08:00
baijunyao
823239010a Use aliyun compose mirrors 2019-08-14 21:50:30 +08:00
Kang HuaiShuai
b8dc1a7b16
Add image
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-07-03 12:22:22 +08:00
Kang HuaiShuai
710c1ec457
Fix dead link
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-07-03 12:06:31 +08:00
Kang HuaiShuai
b9247c16df
Update compose django, Fixed #405
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-07-03 11:49:11 +08:00
khs1994
59af28af86
Merge pull request #407 from yongchengzhao/master
- Fix issue #406: Describe more correctly.
2019-06-28 11:20:06 +08:00
khs1994
0baf0fec99
Merge pull request #409 from yongchengzhao/master
- Fix issue #408: Fix typos.
2019-06-28 11:17:28 +08:00
yongchengzhao
d14a0e0c4a - Fix issue #408: Fix typos. 2019-06-28 10:16:12 +08:00
yongchengzhao
e7c1782c51 - Fix issue #408: Fix typos. 2019-06-28 10:04:57 +08:00
yongchengzhao
7b02f90f09 - Fix issue #406: Describe more correctly. 2019-06-27 17:03:03 +08:00
khs1994
4ed6156a03
Add ci icon [skip ci] 2019-05-14 00:29:12 +08:00
khs1994
a0c7670738
Update README [skip ci] 2019-05-13 23:43:29 +08:00
khs1994
00ec580e74
Fix gitbook build error: use page-treeview@2.9.8 2019-05-13 22:58:26 +08:00
khs1994
3442dab121
Update cloud 2019-05-12 10:14:00 +08:00
khs1994
2e747fe2a5
[install] Update mirror: remove docker cn registry #370 2019-05-12 09:44:17 +08:00
khs1994
df2537b721
Update cloud 2019-05-12 09:41:35 +08:00
khs1994
bf04ac99a3
Update jd link [skip ci] 2019-05-10 07:27:55 +08:00
khs1994
77c8ae525a
Buy book by wechat miniprogram [skip ci] 2019-05-07 23:16:36 +08:00
Baohua Yang
f7dcffc7be Merge branch 'master' of github.com:yeasy/docker_practice 2019-05-05 19:31:08 +08:00
Baohua Yang
a17f3f6b2f Add resource 2019-05-05 19:31:06 +08:00
khs1994
8576e16b61
ubuntu 14.04,debian 7 and 8 EOL 2019-04-29 09:29:46 +08:00
khs1994
4949de94c4
Merge pull request #399 from SmallTianTian/patch-1
expose port.
2019-04-15 20:22:09 +08:00
SmallTianTian
44e504c604
expose port. 2019-04-15 11:11:58 +08:00
khs1994
0370871867
Add BuildKit and docker manifest command. close #390 ,close #391
Signed-off-by: khs1994 <khs1994@khs1994.com>
2019-03-29 12:02:18 +08:00
khs1994
d3c197ddfc
show repo language is go 2019-03-22 10:35:29 +08:00
khs1994
8fc2003414
Update README
* use jd.com cps url, analysis docker user trend
2019-03-09 11:16:27 +08:00
khs1994
c446640591
Fix format and update outdate content 2019-03-08 12:21:07 +08:00
Baohua Yang
6a97772e79
Merge pull request #388 from daixiang0/delete-blank
Remove unused blank spaces
2019-02-22 23:44:13 +08:00
Xiang Dai
d4bbcc0cfb delete all duplicate empty blanks
Signed-off-by: Xiang Dai <764524258@qq.com>
2019-02-21 10:53:33 +08:00
khs1994
994f6ac101
Replace http with https 2019-01-06 10:15:13 +08:00
khs1994
fbf5a286ab
Update install 2019-01-06 10:00:38 +08:00
khs1994
81e68f241c
Update docker official docs link 2019-01-06 09:50:03 +08:00
khs1994
aff886341f
Update link 2019-01-06 09:40:31 +08:00
khs1994
44530ff366
Add aliyun mirror 2019-01-01 17:59:58 +08:00
khs1994
e2baa6401a replace crlf,Fix #338 2019-01-01 10:30:49 +08:00
khs1994
560c23797a
Update typeset 2018-12-31 16:09:34 +08:00
khs1994
efee23eca7
Add cases/ci travis
Signed-off-by: khs1994 <khs1994@khs1994.com>
2018-12-31 15:57:44 +08:00
khs1994
234ac706a3
Update dockerfile format 2018-12-31 14:50:31 +08:00
khs1994
11e2bf1701
Add Dockerfile multi stage laravel 2018-12-31 14:39:26 +08:00
khs1994
c8b73b20c6
Add php image 2018-12-31 09:25:33 +08:00
khs1994
2921a406d6
Update kubernetes 2018-12-31 09:06:28 +08:00
khs1994
944cb0dfd1
Update fedora.md 2018-12-30 17:43:34 +08:00
khs1994
2437dd0158
Fix last commit error 2018-12-26 16:47:44 +08:00
Baohua Yang
a7660df66e Add more debug skills 2018-12-26 10:11:42 +08:00
Baohua Yang
e2d5a2dff0 Add debug skills 2018-12-26 10:05:42 +08:00
khs1994
9899c7028e
Fix image link 404 2018-12-25 19:20:32 +08:00
khs1994
e1552503ac
Merge pull request #385 from jxlwqq/patch-1
Fix CentOS website
2018-12-22 00:08:19 +08:00
jxlwqq
35f4ca76b6
Fix CentOS website 2018-12-22 00:04:50 +08:00
khs1994
e828a4888d
Update debian to stretch 2018-12-19 17:27:21 +08:00
khs1994
af7663bd61
Update ubuntu to 18.04 2018-12-19 17:24:52 +08:00
khs1994
4d38aaad3b
Fix #383, base image not include wget,Update based image to debian:stretch 2018-12-19 17:08:32 +08:00
xufanglu
89f7f3cf98 Use daemon.json 2018-12-18 13:13:52 +08:00
khs1994
7a45ac029e
Update soft version 2018-12-15 23:04:32 +08:00
khs1994
6d4702484d
replace docker cloud with docker hub 2018-12-14 19:36:17 +08:00
khs1994
a50641d973
replace docker store with docker hub 2018-12-14 19:08:14 +08:00
khs1994
3b798d1e64
Update format 2018-12-13 20:51:30 +08:00
khs1994
553ca77a07
Merge pull request #380 from daixiang0/update-faq
Update stop cmd
2018-12-13 19:24:00 +08:00
daixiang0
e3c46e3b09 Update stop cmd
`docker stop` send SIGTERM, and then SIGKILL after grace period,
while `docker kill` send SIGTERM directly,
so `docker stop` is more safe and ensure the integrity of the data.

Signed-off-by: daixiang0 <764524258@qq.com>
2018-12-13 19:21:11 +08:00
long
86657b8742 Update data root info 2018-12-13 18:57:41 +08:00
long
39b69945cc Update docker save command info
Signed-off-by: daixiang0 <764524258@qq.com>
2018-12-13 18:13:08 +08:00
khs1994
15ce0d8e04
Update storage drivers #378 #375 2018-12-13 18:01:45 +08:00
khs1994
8bd26974b7
Merge pull request #374 from mapleeit/patch-1
fix: fix typos
2018-12-11 14:41:27 +08:00
Maple Miao
38097d47eb
fix: fix typos 2018-12-11 14:30:59 +08:00
Devin-Li
cb5813d10a update entrypotin.md 2018-12-10 18:20:10 +08:00
khs1994
2cc1207dc3
Update ubuntu version to 18.04
Signed-off-by: khs1994 <khs1994@khs1994.com>
2018-12-08 21:48:16 +08:00
Baohua Yang
6f12336f33
Merge pull request #371 from yeasy/miniprogram
Add wechat mini-program info
2018-12-08 21:12:30 +08:00
khs1994
49841871aa
Add miniprogram 2018-12-08 18:08:27 +08:00
khs1994
1b306447ef
Update Dockerfile
Signed-off-by: khs1994 <khs1994@khs1994.com>
2018-11-02 08:26:50 +08:00
khs1994
dfa885f4f0
Update supported os
Signed-off-by: khs1994 <khs1994@khs1994.com>
2018-11-02 08:01:29 +08:00
Baohua Yang
08dc228718 Fix issue#362: update book info 2018-10-23 21:35:18 +08:00
khs1994
cabdcdb898
Merge pull request #364 from wxy325/master
Update django.md, Fix a typo
2018-10-23 12:51:54 +08:00
Xiangyu Wu
627b17d2f5
Update django.md
Fix typo
2018-10-22 15:25:40 -07:00
khs1994
33bccf2ac4 Next version is 1.0.0 2018-10-21 09:51:36 +08:00
khs1994
9919fd1c43 Add Fedora 2018-10-21 09:43:53 +08:00
khs1994
b955c79fb9
Merge pull request #359 from mahuihuang/fix-etcd 2018-09-14 16:50:51 +08:00
Ma Huihuang
1fdb8da844
添加环境变量
`No help topic for 'put'·
2018-09-14 16:42:45 +08:00
khs1994
a43bbd4f44
Merge pull request #358 from ujnzxw/master
fix typos
2018-09-08 11:10:35 +08:00
Xiaowei ZHAO
cbe21e28ec fix typos 2018-09-08 02:24:38 +00:00
khs1994
aa8adb4a36
Merge pull request #357 from LeonGravel/patch-1
fix typo
2018-09-06 22:08:40 +08:00
LeonGravel
7005ba3d88
fix typo 2018-09-06 14:43:10 +08:00
khs1994
276199aa37 Fix wordpress compose file volume format 2018-08-25 22:20:04 +08:00
khs1994
ee656ff4bb
Update issue link 2018-08-14 09:30:08 +08:00
khs1994
c6ac96b64e Update Ubuntu LTS version to 18.04, Fix #352 2018-08-05 08:04:49 +08:00
khs1994
2e70663bf9 Change Docker CE update channels #351 2018-07-20 09:37:22 +08:00
康怀帅
80cb2445fc
CA should put client host folder 2018-07-11 08:13:17 +08:00
康怀帅
c3c182e674 Fix registry tls error 2018-07-10 12:28:18 +08:00
khs1994
fb66c7e5ee Update demo image version 2018-07-10 08:09:43 +08:00
khs1994
8f46e579f4 Update etcd 2018-07-10 08:08:34 +08:00
khs1994
c6c0a6f1fe Remove -v description 2018-07-10 08:08:21 +08:00
khs1994
9f08baaa5c Update install 2018-07-10 08:07:31 +08:00
康怀帅
7bbc556e6e
Remove aliyun daocloud 2018-06-28 11:15:25 +08:00
Baohua Yang
c6118d511d
Merge pull request #347 from Tuvie/master
Fix mismatch between outline and title
2018-06-21 13:59:56 +08:00
Li Zhaogeng
d242aaf10e Fix a dismatch between table of contents and contents 2018-06-21 11:46:41 +08:00
康怀帅
113b5c2d20
Update README.md 2018-06-03 21:41:17 +08:00
康怀帅
b97e5e2a8b
Update Docker version [skip ci] 2018-06-03 21:39:52 +08:00
康怀帅
54a8025903
Merge pull request #344 from edxi/patch-1
host file
2018-06-03 21:34:51 +08:00
Xi ErDe
02d4c5704c
host file 2018-06-03 21:28:31 +08:00
denwork
e0791a61a2 Create nexus3_registry.md 2018-05-31 18:30:41 +08:00
Baohua Yang
5002488c24
Merge pull request #339 from khs1994-docker/master
Update Swarm mode: add rolling_update
2018-05-23 22:54:33 +08:00
康怀帅
20f19cbafd
Update docker machine on windows 10
* Set up an external network switch. If you plan at any point to use Docker Machine to set up multiple local VMs, you need this anyway, as described in the topic on the Hyper-V driver for Docker Machine.

* https://docs.docker.com/machine/drivers/hyper-v/#example
2018-05-23 17:45:41 +08:00
khs1994
86d532630f Update Swarm mode: add rolling_update 2018-05-23 17:18:42 +08:00
康怀帅
fcd9f49e24
Update raspberry-pi content Fix #337 2018-05-10 08:09:39 +08:00
康怀帅
255292cc01
Change docker rmi TO docker image rm #279 2018-05-09 19:45:51 +08:00
Baohua Yang
9b9ab2349a
Update gitbook link 2018-05-07 16:42:04 +08:00
Baohua Yang
122df6f233
Update gitbook read link 2018-04-29 15:46:38 +08:00
Shude Li
274cb33e89 doc(compose_file): fix version number of secrets (#332) 2018-04-22 09:04:30 -07:00
康怀帅
ed816ba448
Merge pull request #330 from songjiayang/master
fix typo
2018-04-17 19:08:53 +08:00
songjiayang
ca01158e1c fix typo 2018-04-17 17:40:50 +08:00
康怀帅
60fb624a40
Merge pull request #329 from khs1994-docker/master
Remove deprecated content
2018-04-08 21:03:00 +08:00
khs1994
58c6540cdf Remove deprecated content 2018-04-08 21:00:11 +08:00
康怀帅
79702eb956
Merge pull request #327 from khs1994-docker/master
Add some file
2018-04-08 20:36:47 +08:00
khs1994
fed0d4f65b Add some file 2018-04-08 01:06:53 +08:00
康怀帅
79801a2389
Update docker version 2018-03-31 19:22:16 +08:00
康怀帅
c753f3b509
Merge pull request #326 from Alex-WZ/patch-1
Update concepts.md
2018-03-31 15:39:59 +08:00
Alex-WZ
9187715bf0
Update concepts.md
知道容器的生命周期结束或者其被删除 -> 直到容器的生命周期结束或者其被删除
2018-03-31 14:36:42 +08:00
Baohua Yang
85f22aff35
Merge pull request #324 from thomaszdxsn/patch-1
Fix a typo
2018-03-30 21:58:35 +08:00
Yang,Zhou
4c2acb419b
fix a typo 2018-03-30 20:55:02 +08:00
康怀帅
5cfe40a504
Fix docker login docker ce 18.04-rc1+
* https://docs.docker.com/engine/reference/commandline/login/
2018-03-30 10:04:01 +08:00
康怀帅
107b14d6bb
Merge pull request #323 from YL2014/master
Fix 文字错误 拉去 -> 拉取
2018-03-22 13:04:46 +08:00
yl2014
717abe60e7 Fix 文字错误 拉去 -> 拉取 2018-03-22 12:31:35 +08:00
Baohua Yang
0ccdc3fcfe
Minor update expression 2018-03-21 14:59:25 +08:00
康怀帅
2c9acf141c
Update Contents
* Fix offlineread docker image

* Add warning on install

* Update install follow official
2018-03-19 16:04:23 +08:00
康怀帅
4abfa103b6
Merge pull request #321 from khs1994/master
Update Dockerfile multistage-builds #320
2018-03-10 09:18:54 +08:00
khs1994
0db00b9669 Update Dockerfile multistage-builds #320 2018-03-10 09:16:43 +08:00
康怀帅
7594e11f23
Update Compose README
Remove cluster
2018-03-10 08:45:09 +08:00
康怀帅
d58af9ad64
Merge pull request #319 from khs1994/master
Update Swarm mode create #302
2018-03-10 08:36:20 +08:00
khs1994
3b59591f14 Update Swarm mode create #302 2018-03-10 08:34:46 +08:00
康怀帅
53e917bb08
Merge pull request #316 from khs1994/master
Update install
2018-03-08 08:25:55 +08:00
khs1994
9deb181814 Update install 2018-03-08 08:23:35 +08:00
khs1994
37a9ed4b3b Update macOS mirror #313 2018-02-10 18:00:14 +08:00
康怀帅
81ec7190d6 Update offline read
Update offline read  (#312)
2018-01-23 21:52:14 +08:00
康怀帅
4667ffb091
Merge pull request #309 from khs1994/master
Change command docker ps to docker container ls
2018-01-16 16:31:05 +08:00
khs1994
3face791c6 Change command docker ps to docker container ls #279 2018-01-15 22:00:53 +08:00
康怀帅
3de028af98
Remove content 2018-01-15 09:21:09 +08:00
康怀帅
24a24306ae
Update QQ Group status 2018-01-13 00:38:30 +08:00
康怀帅
dcb821d56b
Update ISSUE_TEMPLATE.md 2018-01-13 00:34:33 +08:00
康怀帅
2d4841b764
Update offline 2018-01-05 19:00:22 +08:00
康怀帅
d83d89f927
Merge pull request #308 from khs1994/master
Update gitbook
2018-01-04 16:18:49 +08:00
khs1994
45e6dadac8 Update README.md about download pdf and epub [skip ci] 2018-01-04 16:16:09 +08:00
khs1994
be6840b9c2 Add cover in root 2018-01-04 15:41:34 +08:00
康怀帅
8a276c8595
Fix git url error 2018-01-03 01:08:24 +08:00
Baohua Yang
8aa5ac4172
Merge pull request #306 from khs1994/master
Release v0.9.0
2017-12-31 21:10:11 +08:00
khs1994
eb081e5dfa Release v0.9.0 2017-12-31 14:35:48 +08:00
khs1994
36b793408b Update faq 2017-12-31 14:27:55 +08:00
khs1994
6822561fd1 Update appendix repo wordpress 2017-12-31 14:26:03 +08:00
khs1994
cb18e6f08f Change debian to alpine 2017-12-31 14:20:04 +08:00
khs1994
5f32d8f5ea Fix spelling error 2017-12-31 10:33:52 +08:00
khs1994
c2f14bb2da Update project docker image Dockerfile 2017-12-31 10:30:53 +08:00
khs1994
dddfcf2832 Add shell script for offline read 2017-12-31 10:29:51 +08:00
Baohua Yang
c5c8b7d20a Update introduction and read links 2017-12-31 09:44:51 +08:00
康怀帅
c726aa30df
Fix spelling error 2017-12-29 09:22:07 +08:00
康怀帅
42317a359d
Merge pull request #303 from shawxr/patch-1
Update bind-mounts.md
2017-12-26 16:13:52 +08:00
康怀帅
8a43919e51
Update bind-mounts.md 2017-12-26 16:12:28 +08:00
shawxr
7753df7681
Update bind-mounts.md 2017-12-26 16:05:26 +08:00
Baohua Yang
5603887437
Merge pull request #300 from khs1994/master
Update content
2017-12-25 21:12:58 +08:00
康怀帅
d307ac54f6
Update advanced_network 2017-12-20 23:49:49 +08:00
khs1994
8589701bea Update volume 2017-12-20 23:46:55 +08:00
khs1994
b2e0b720ac Update registry 2017-12-20 23:46:46 +08:00
khs1994
9d196a2022 Update image 2017-12-20 23:45:25 +08:00
khs1994
1ea4934758 Update swarm mode 2017-12-20 23:44:38 +08:00
khs1994
b2427b1742 Add tips #265 2017-12-20 23:44:09 +08:00
Baohua Yang
b41d564c01
Merge pull request #299 from khs1994/master
Update mesos/framework.md
2017-12-20 21:37:17 +08:00
khs1994
d9fe0cc0d4 Update install 2017-12-20 10:24:36 +08:00
khs1994
19f8ec9654 Update mesos/framework.md 2017-12-20 10:14:53 +08:00
康怀帅
38070099d8
Update framework.md 2017-12-19 18:11:08 +08:00
康怀帅
c3bc7b124b
Merge pull request #298 from ysykzheng/master
fix link
2017-12-19 18:10:02 +08:00
康怀帅
c0fb7f3af0
Update framework.md 2017-12-19 18:08:52 +08:00
ysykzheng
4fa76da7f8
fix link 2017-12-19 16:33:37 +08:00
Baohua Yang
a614374641
Merge pull request #297 from khs1994/master
User docker exec to enter container
2017-12-18 16:44:42 +08:00
khs1994
8f92f3b114 Remove some content in data_management 2017-12-17 23:02:42 +08:00
khs1994
7d7b4f2afc Rename enter.md to attach_exec.md 2017-12-17 22:57:11 +08:00
Baohua Yang
ba0b55101c
Merge pull request #296 from khs1994/master 2017-12-17 13:39:32 +08:00
khs1994
95d063dbd1 Update compose 2017-12-16 15:08:02 +08:00
康怀帅
047755b702
Update content (#294) 2017-12-16 13:56:57 +08:00
Baohua Yang
654737a396
Merge pull request #292 from khs1994/master 2017-12-13 10:44:19 +08:00
khs1994
8615cbf286 Add registry auth TLS #180 2017-12-11 20:22:51 +08:00
khs1994
154a42bd69 Fix error:secret to config 2017-12-11 17:44:48 +08:00
Baohua Yang
e6291d57f9
Merge pull request #291 from khs1994/master 2017-12-10 15:09:26 +08:00
khs1994
e9c9b8391d Update install: add logout and login user after install 2017-12-10 13:21:52 +08:00
khs1994
3ab7f6dfb8 Update docker-compose.yml 2017-12-10 12:53:57 +08:00
khs1994
a3267d1b3a Update book.json [skip ci] 2017-12-10 12:41:08 +08:00
khs1994
8dbaa7ea33 Update cloud: add images 2017-12-10 12:19:24 +08:00
khs1994
8939af4f97 Update compose #288 2017-12-10 11:52:09 +08:00
khs1994
6bcce7e562 Remove img 2017-12-10 11:00:24 +08:00
khs1994
6af58b6c4a Move DNS to network #278 2017-12-10 10:51:40 +08:00
Baohua Yang
0c594a5cc5
Merge pull request #290 from khs1994/master
Release v0.9-rc2: remove unused files
2017-12-09 20:05:20 +08:00
khs1994
c44f4d78b1 Update install docker 2017-12-09 00:12:30 +08:00
khs1994
9face881c7 Update install docker 2017-12-09 00:12:02 +08:00
khs1994
f60f4dd975 Release v0.9-rc2 2017-12-08 23:32:53 +08:00
khs1994
3c40c84cde Remove useless file _local 2017-12-08 23:19:20 +08:00
khs1994
7b93ed069f Add linuxkit #287 2017-12-08 23:01:04 +08:00
khs1994
3b508242ba Remove useless file 2017-12-08 23:00:19 +08:00
Baohua Yang
8d240b84bb
Merge pull request #286 from khs1994/master
Update content
2017-12-08 22:33:58 +08:00
khs1994
528267b4ba Add docker config Only Swarm mode #283 2017-12-08 19:15:27 +08:00
Baohua Yang
bf18493b9a
Fix MacOS to macOS 2017-12-08 18:58:19 +08:00
Baohua Yang
17856d1067
Update ISSUE_TEMPLATE.md 2017-12-07 10:18:24 +08:00
khs1994
e330bbdad2 Update CONTRIBUTING.md 2017-12-06 21:43:01 +08:00
khs1994
31a0806e2b Add git cn mirror #276 2017-12-06 19:50:49 +08:00
khs1994
e0c41e4feb Fix error in jekyll: NOT INCLUDE _images 2017-12-06 19:30:57 +08:00
khs1994
299013f4f7 Add Best practices for writing Dockerfiles 2017-12-06 19:29:09 +08:00
khs1994
79adc251a6 Add docker secret #285 2017-12-06 13:23:22 +08:00
Baohua Yang
99172ecdad
Merge pull request #284 from khs1994/master
Update network usage and revise changelog and contributing docs
2017-12-05 16:40:41 +08:00
khs1994
8e31d114f8 Add docker-library/docs in dockerfile/references.md 2017-12-05 13:04:01 +08:00
khs1994
90b6d52969 Change revision.md to CHANGELOG.md AND Move CONTRIBUTING.md to root 2017-12-05 12:36:26 +08:00
khs1994
240c26edf8 Change revision.md to CHANGELOG.md AND Move CONTRIBUTING.md to root 2017-12-05 11:33:33 +08:00
khs1994
de1be5e574 Update revision 2017-12-05 11:16:51 +08:00
khs1994
3a09552f97 Update: #279 2017-12-05 11:15:59 +08:00
khs1994
edd4464176 Update Registry AND #279 2017-12-05 11:15:24 +08:00
khs1994
3aecfc8b54 Update container:Change docker images TO docker image ls #279 2017-12-05 11:14:56 +08:00
khs1994
4958b227d7 Update network:Change --net TO --network 2017-12-05 11:03:39 +08:00
Baohua Yang
7c84589565
Merge pull request #281 from khs1994/master
Update container image chapter
2017-12-05 10:19:08 +08:00
Baohua Yang
0d89e7120f
Merge pull request #280 from khs1994/master
Fix #278: Update SUMMARY
2017-12-05 09:48:34 +08:00
khs1994
94df5237a6 Update image:Change docker images TO docker image ls,etc #279 2017-12-05 09:40:50 +08:00
khs1994
62bf5171e4 Update container:Change docker ps TO docker container ls,etc #279 2017-12-05 09:22:06 +08:00
khs1994
b7900844d2 Update SUMMARY #278 2017-12-04 20:49:59 +08:00
Baohua Yang
52707276e6
Merge pull request #277 from khs1994/master 2017-12-04 20:36:38 +08:00
khs1994
0ac2b50df1 Update .github 2017-12-04 11:49:59 +08:00
khs1994
f2c04dff35 Update book.json 2017-12-04 11:34:47 +08:00
khs1994
c8fed2d977 Update machine in swarm 2017-12-04 11:34:28 +08:00
Baohua Yang
ce051cd1a1
Merge pull request #274 from khs1994/master 2017-12-03 23:02:12 +08:00
khs1994
12ab87c248 Update etcd 2017-12-03 18:53:35 +08:00
khs1994
10a9cf5687 Update machine 2017-12-03 18:26:10 +08:00
khs1994
38cfeae83b Update SUMMARY revision 2017-12-03 14:34:21 +08:00
khs1994
555fee7d72 Update machine 2017-12-03 14:33:46 +08:00
khs1994
7b2ad5b30e Update etcd 2017-12-03 14:04:03 +08:00
khs1994
fb85efc58d Update etcd to 3.x #275 2017-12-03 13:57:02 +08:00
khs1994
47eb770257 Update CoreOS 2017-12-03 13:51:34 +08:00
khs1994
3e8abe7a38 Fix spelling error 2017-12-03 10:31:28 +08:00
khs1994
9c71a03e56 Remove links in compose #215 2017-12-03 10:28:35 +08:00
khs1994
1f59ebb225 Update install mirror 2017-12-03 10:27:36 +08:00
khs1994
221644a271 Update repository 2017-12-03 10:27:22 +08:00
khs1994
1ceb07e7f0 Update image 2017-12-03 10:27:05 +08:00
khs1994
6dc994c19c Update bind-mounts 2017-12-03 10:26:48 +08:00
khs1994
5ff464fc96 Update basic_concept 2017-12-03 10:26:28 +08:00
Baohua Yang
28cf0432f3
Merge pull request #273 from khs1994/master 2017-12-02 08:12:05 +08:00
khs1994
6886790a18 Update cases os 2017-12-01 23:23:26 +08:00
Baohua Yang
71012e03d6
Merge pull request #272 from khs1994/master
Fix #270: docker daemon deprecated
2017-12-01 22:35:12 +08:00
khs1994
79bb7135db Update etcd 2017-12-01 17:33:15 +08:00
khs1994
1aeafe53d8 Update image 2017-12-01 17:33:05 +08:00
khs1994
7880173c63 Update cases os 2017-12-01 17:32:53 +08:00
khs1994
55a2f02431 Update appendix 2017-12-01 17:32:39 +08:00
Baohua Yang
c798928369
Merge pull request #271 from khs1994/master
Update k8s content
2017-12-01 17:29:23 +08:00
khs1994
9ab182913c Fix #270 docker daemon deprecated 2017-12-01 16:50:45 +08:00
Baohua Yang
99b8903808
Merge pull request #269 from khs1994/master
Update registry
2017-12-01 16:43:19 +08:00
khs1994
57fc8a7b3d Fix copywriting in k8s 2017-12-01 16:32:42 +08:00
khs1994
630de255d8 Update registry 2017-12-01 15:46:26 +08:00
Baohua Yang
cc14818ffa
Add using issue 2017-11-30 23:06:37 +08:00
康怀帅
e1db77a27a
Update compose install (#267)
* Update drone

* Update compose install
2017-11-30 08:38:35 -06:00
Baohua Yang
c6a74cdb98
Add step for reviewing 2017-11-30 22:03:03 +08:00
康怀帅
c68386e0e2
Update Drone demo 2017-11-30 18:34:14 +08:00
khs1994
99a7cd31b4 Fix error link in install machine 2017-11-30 18:28:23 +08:00
khs1994
239c95771f Update linking 2017-11-30 18:22:16 +08:00
khs1994
a3d9d9382f Update Docker Registry 2017-11-30 16:59:04 +08:00
khs1994
d8e71510f7 Update install 2017-11-30 15:57:27 +08:00
康怀帅
cd776a1a96
Merge pull request #264 from khs1994/master
Add Drone chinese resources AND Fix error links
2017-11-30 01:39:30 -06:00
khs1994
afa90259dd Update Drone #261 2017-11-30 15:28:53 +08:00
khs1994
9930d6c2ea Add Drone #261 2017-11-30 15:05:57 +08:00
khs1994
d8f1e91471 Add chinese docker resources 2017-11-30 15:05:32 +08:00
khs1994
6ec314e229 Fix links 2017-11-30 15:04:49 +08:00
康怀帅
79dd874576
Add qq group x 2017-11-29 20:04:21 +08:00
康怀帅
656f1445cb
Add gitter 2017-11-29 19:32:50 +08:00
康怀帅
540c874ac0
Merge pull request #258 from auroraeffect/master
Fix MongoDB version error in compose
2017-11-29 05:18:10 -06:00
liu sicong
84a0453a9b
Merge pull request #1 from auroraeffect/auroraeffect-patch-version-error
Fix MongoDB version error
2017-11-29 17:20:47 +08:00
liu sicong
88607c404c
Fix MongoDB version error
3.0 => 3.2
2017-11-29 17:19:25 +08:00
khs1994
5ed88ccd75 Remove fleet #222 2017-11-29 15:39:06 +08:00
khs1994
7cba69c5f7 Release v0.9-rc1 2017-11-29 10:49:36 +08:00
khs1994
f2a2e421b5 Update docker-compose.yml 2017-11-29 10:35:57 +08:00
khs1994
c4d6b80c18 Change picture links in README.md 2017-11-29 10:35:36 +08:00
khs1994
4fc094c17f Add picture from docs.docker.com 2017-11-29 10:25:19 +08:00
khs1994
78335d324d Update install 2017-11-29 10:24:44 +08:00
khs1994
134fc6aad9 Update container 2017-11-29 10:24:32 +08:00
khs1994
d9a3b77753 Update compose 2017-11-29 10:24:19 +08:00
khs1994
d3d48f0e38 Fix error link 2017-11-29 10:24:02 +08:00
khs1994
8bf728103b Update advanced_network 2017-11-29 10:23:42 +08:00
康怀帅
a9eb521865
Update offline read in Windows: fix error in Docker CE LCOW (Permission denied) (#257) 2017-11-28 02:19:39 -06:00
康怀帅
e8a5cbb561
Update docker-compose.yml 2017-11-28 15:35:51 +08:00
康怀帅
3a8c201fbe
Add travis CI/CD #196 #254 (#256)
Add travis CI/CD #196 #254
2017-11-27 23:38:13 -06:00
khs1994
93f8b01d32 Fix error in docker-compose.yml 2017-11-28 12:05:00 +08:00
khs1994
c55e82300c Change offline read way Who use Windows 2017-11-28 11:59:21 +08:00
康怀帅
85d8a2d021
Fix copywriting 2017-11-27 16:16:44 +08:00
康怀帅
d372fe7eb6
Merge pull request #253 from yeasy/dev
Update content
2017-11-27 02:15:13 -06:00
khs1994
a8e5a3069f Fix copywriting 2017-11-27 14:31:01 +08:00
khs1994
bdb78e3331 Change link 2017-11-27 14:29:33 +08:00
khs1994
75b1c683e0 Update image 2017-11-27 14:29:13 +08:00
khs1994
b6baf62508 Update basic_concept 2017-11-27 14:29:00 +08:00
khs1994
7ebb52d297 Update SUMMARY.md 2017-11-27 14:28:41 +08:00
khs1994
458b26712c Fix spelling error 2017-11-27 14:28:20 +08:00
khs1994
b0e5d9894a Update content 2017-11-26 11:28:55 +08:00
khs1994
50ed70f29b Update ufs 2017-11-26 10:38:07 +08:00
康怀帅
c251c3936d
Merge pull request #249 from yeasy/dev
Add Swarm mode AND Fix content
2017-11-25 20:19:16 -06:00
khs1994
69f46f9664 Update underly 2017-11-26 10:18:24 +08:00
khs1994
0bbbad9add Add OverlayFS #250 2017-11-26 10:06:57 +08:00
khs1994
9b4b96d3a4 Update Swarm mode overview 2017-11-26 09:57:48 +08:00
khs1994
990f85cb5b Update Swarm mode 2017-11-26 09:54:16 +08:00
khs1994
584a3696a1 Update compose 2017-11-26 09:54:04 +08:00
khs1994
c5c10dd086 Update book.json ADD github link SET language 2017-11-25 23:16:43 +08:00
khs1994
e531f6a36b Update Swarm mode 2017-11-25 15:43:51 +08:00
Baohua Yang
9e3a4a3bbe
Simplify content 2017-11-25 14:17:45 +08:00
khs1994
486e9fb7d0 Update Swarm mode create 2017-11-25 10:27:27 +08:00
khs1994
d1597500a3 Add Swarm mode deploy 2017-11-25 10:26:58 +08:00
khs1994
4ae6580c4d Add Swarm mode README 2017-11-25 09:57:16 +08:00
康怀帅
7022c5ab4c
Merge pull request #247 from yeasy/dev
Add multistage builds
2017-11-24 19:45:30 -06:00
khs1994
31365bddf2 Add Swarm mode overview 2017-11-25 09:45:16 +08:00
khs1994
e2ebbd2f6e Add Swarm mode create 2017-11-25 09:43:04 +08:00
khs1994
766f3015aa Remove english 2017-11-25 09:28:28 +08:00
khs1994
c9ee2a34e4 Fix #245 2017-11-24 22:42:49 +08:00
khs1994
fd1eb89c1e Update content 2017-11-24 22:42:17 +08:00
khs1994
4eabbf4661 Add multistage builds #226 2017-11-24 18:39:59 +08:00
khs1994
f2386afe6c Add multistage builds #226 2017-11-24 18:37:38 +08:00
khs1994
e65cf12625 Add multistage builds #226 2017-11-24 18:36:30 +08:00
康怀帅
addf6b936f
Fix table 2017-11-24 16:50:25 +08:00
康怀帅
4d4895435a
Merge pull request #246 from yeasy/dev
Update content
2017-11-24 02:46:41 -06:00
khs1994
c20ebd66e4 Fix #20 2017-11-24 12:32:36 +08:00
khs1994
17bc13a877 Update install 2017-11-24 12:31:12 +08:00
khs1994
04c031fc40 Update image 2017-11-24 12:30:57 +08:00
khs1994
90bfc0d610 Update container 2017-11-24 12:30:38 +08:00
khs1994
dce2e464da Update data management 2017-11-24 12:30:18 +08:00
khs1994
0077c223c8 Update .github 2017-11-24 11:31:22 +08:00
khs1994
47b202f7bc Update revision.md 2017-11-24 11:19:59 +08:00
khs1994
68c546add2 Update offline read wiki link 2017-11-24 11:07:21 +08:00
康怀帅
2fb8281127
Merge pull request #244 from yeasy/dev
Update appendix/repo #230
2017-11-24 10:56:13 +08:00
康怀帅
fc416722a6
Remove SSH 2017-11-24 10:32:39 +08:00
khs1994
0d4c9eda69 Update appendix/resources 2017-11-24 10:27:39 +08:00
khs1994
304d6adc25 Update appendix/repo 2017-11-24 10:19:15 +08:00
康怀帅
3dabcb0fa7
Merge pull request #243 from yeasy/dev
Update install AND FAQ
2017-11-24 10:17:47 +08:00
khs1994
b3ce4ff613 Update FAQ 2017-11-24 09:56:30 +08:00
khs1994
c94a86b7f6 Update install content AND Add raspberry-pi 2017-11-24 09:51:06 +08:00
khs1994
4b34085c5f Update FAQ 2017-11-24 00:29:51 +08:00
康怀帅
5c7db73fd0
Merge pull request #241 from yeasy/dev
Update content
2017-11-24 00:00:17 +08:00
khs1994
98c02be4cd Fix spelling error 2017-11-23 23:59:28 +08:00
khs1994
3c27207c8e Fix spelling error 2017-11-23 23:48:52 +08:00
khs1994
8c850ca22b Fix spelling error 2017-11-23 23:38:05 +08:00
khs1994
ddbadcb64d Remove CoreOS in cases/os 2017-11-23 23:31:47 +08:00
khs1994
29561e2395 Add docker exec #240 #191 #171 #164 #53 2017-11-23 22:30:37 +08:00
khs1994
0ba14de20a Update Docker Compose commands 2017-11-23 22:08:41 +08:00
khs1994
2cd1377229 Fix error 2017-11-23 21:35:13 +08:00
khs1994
edd5374247 Add ico in README.md 2017-11-23 21:26:55 +08:00
khs1994
ecf185ee61 Update Docker Compose file format 3 2017-11-23 21:25:55 +08:00
khs1994
176422becc Update Docker network 2017-11-23 21:25:42 +08:00
Baohua Yang
d2512412d6
Merge pull request #239 from yeasy/dev 2017-11-23 18:22:15 +08:00
康怀帅
359e765322
Merge pull request #237 from yeasy/dev
Add compose in network/linking.md
2017-11-23 15:50:11 +08:00
khs1994
cbc8f54ed7 Update Docker Compose file format 3 2017-11-23 15:48:52 +08:00
khs1994
99401dcc4f Add compose in network/linking.md 2017-11-23 12:59:13 +08:00
khs1994
39bef7f604 Remove Docker Swarm 2017-11-23 10:56:12 +08:00
khs1994
457813a231 Update README.md 2017-11-23 10:55:12 +08:00
康怀帅
fef878d1f3
Merge pull request #236 from yeasy/dev
Remove Docker Swarm,etc
2017-11-23 10:50:25 +08:00
khs1994
e866c2a651 Update network remove --link #215 2017-11-23 10:42:43 +08:00
khs1994
e79a646b4e Update revision.md 2017-11-23 10:41:54 +08:00
Baohua Yang
81e9416d13 Update templates for github issue and pr 2017-11-23 09:59:40 +08:00
khs1994
40a14569ab Remove Docker Swarm 2017-11-23 09:57:43 +08:00
Baohua Yang
3f754a806e Minor update description and review image
Fix #231: Update legacy branch name
2017-11-23 09:42:22 +08:00
康怀帅
5557170a95
Merge pull request #234 from yeasy/dev
merge dev branch
2017-11-23 08:05:24 +08:00
khs1994
e3beb61a5f Update machine 2017-11-23 01:35:38 +08:00
khs1994
9a42c63542 Update machine 2017-11-23 01:29:38 +08:00
khs1994
731dea9a16 Update machine 2017-11-23 01:27:16 +08:00
khs1994
4677bf077e Update machine 2017-11-23 01:23:51 +08:00
khs1994
15ae487adc Update machine 2017-11-23 01:22:25 +08:00
khs1994
dd248d7dc2 Update data management #214 2017-11-23 00:22:03 +08:00
khs1994
888f253ac5 Update data management #214 2017-11-23 00:19:30 +08:00
康怀帅
ecb46c34ce
Merge pull request #232 from yeasy/dev
计划发布 0.9 版本,基于 Docker CE v17.09 Stable
2017-11-22 22:11:39 +08:00
khs1994
7049b1ce99 计划发布 0.9 版本,基于 Docker CE v17.09 Stable 2017-11-22 22:09:26 +08:00
康怀帅
80a07aee73
Merge pull request #228 from yeasy/dev
Fix #227 #180
2017-11-22 21:09:32 +08:00
khs1994
a7d8829eaa Remove Registry config.md #180 2017-11-22 21:07:49 +08:00
khs1994
eb1573a1fe Update content #227 #180 2017-11-22 20:28:10 +08:00
khs1994
1a75b7d669 Follow chinese-copywriting-guidelines #20 2017-11-22 11:41:14 +08:00
khs1994
c0324f00c3 Follow chinese-copywriting-guidelines #20 2017-11-22 11:36:18 +08:00
康怀帅
41a8e21fe8
Merge pull request #225 from yeasy/dev
Fix #223
2017-11-22 11:23:42 +08:00
khs1994
ef3e10ccb4 Fix #223 2017-11-22 11:22:57 +08:00
康怀帅
c36a42be8c
Fix table error 2017-11-22 11:22:16 +08:00
康怀帅
d3226aa818
Merge pull request #224 from yeasy/dev
Fix #117
2017-11-22 11:15:27 +08:00
khs1994
7cbdf27d93 Fix #117 2017-11-22 11:13:23 +08:00
康怀帅
c3c3cf98cb
Merge pull request #221 from khs1994/master
Chang docker image in offline read AND remove Dockerpool
2017-11-22 10:15:00 +08:00
khs1994
813e601bc1 Chang docker image in offline read 2017-11-22 10:10:36 +08:00
Baohua Yang
0ed5c2683c
Merge pull request #219 from khs1994/master
Fix #216 #218
2017-11-22 09:29:16 +08:00
khs1994
4139271563 Remove DockerPool content 2017-11-21 19:17:45 +08:00
康怀帅
48a3624644
Fix #216 #218
Fix #216 #218
2017-11-21 19:05:06 +08:00
Baohua Yang
fcc6535910
Merge pull request #212 from khs1994/master
Fix code grammar indicator, update help docs
2017-11-14 11:16:53 +08:00
khs1994
cb21e9b167 Follow GitHub recommended community standards 2017-11-13 19:35:41 +08:00
khs1994
d1a640f383 Fix #206 #117 2017-11-13 18:54:38 +08:00
khs1994
f838297f05 Update image install content 2017-11-13 18:19:35 +08:00
Baohua Yang
1ea4c09c80
Merge pull request #211 from khs1994/master
Update with latest content
2017-11-12 22:41:53 +08:00
khs1994
5ed1521c6a Fix error in daemon json 2017-11-01 15:50:44 +08:00
khs1994
1d06af72da Update content AND Use Docker official CN mirror in example 2017-11-01 15:47:41 +08:00
khs1994
313bfc0b72 Update README.md 2017-11-01 15:15:12 +08:00
Baohua Yang
096350920c
Merge pull request #204 from khs1994/master
Fix #203 #206 #208 #209
2017-10-31 19:11:08 -05:00
khs1994
ff460c1f43 Remove dockerfile in appendix #209 2017-11-01 00:36:57 +08:00
khs1994
31fdca5373 Update cloud 2017-11-01 00:24:45 +08:00
khs1994
4f42a0e730 Update docker-compose 2017-11-01 00:20:30 +08:00
khs1994
833aa02d92 Remove sudo #206 AND Remove 「本地安装」「批量上传脚本」#208 2017-10-31 23:55:51 +08:00
khs1994
61be103f7f Use 「docker container」 in docker v1.13+ #203 AND Remove sudo #206 2017-10-31 23:24:49 +08:00
khs1994
23d6736c12 Use 「docker image」 in docker v1.13+ 2017-10-24 13:06:50 +08:00
khs1994
d8632d8554 Add Docker Management Commands in docker v1.13+ 2017-10-24 12:30:17 +08:00
Baohua Yang
417900da5b Merge pull request #205 from LetianFeng/master
Fix typo: Dockrfile -> Dockerfile
2017-10-20 07:52:46 -05:00
Letian Feng
6bbd85cc37 Fix 单词错误 Dockrfile -> Dockerfile 2017-10-20 11:09:52 +02:00
khs1994
a3660ecede Remove outdated method and add new way in /etc/docker/daemon.json 2017-10-19 23:24:41 +08:00
khs1994
fe91c90324 Add please use latest docker (v17.10.0) 2017-10-19 23:22:55 +08:00
khs1994
a24a153289 Fix error links 2017-10-19 22:46:23 +08:00
khs1994
baffd6a778 Change aliyun install mirror to ustc because aliyun is outdated,it latest update in 2017/06/23 2017-10-19 22:44:25 +08:00
Baohua Yang
74289f0e6d Merge pull request #202 from khs1994/master
Fix links
2017-09-16 10:49:07 +08:00
khs1994
a0135f2b71 Fix links 2017-09-16 10:27:27 +08:00
Baohua Yang
695c8f2a49 Set theme jekyll-theme-slate 2017-09-11 15:44:34 +08:00
Baohua Yang
426e6411d1 Merge pull request #199 from khs1994/master
Fix #186: Refine installation
2017-09-05 22:00:31 +08:00
khs1994
c9a27f1ad8 REMOVE alauda mirror and Docker Toolbox 2017-09-05 21:40:41 +08:00
khs1994
57dfd608d3 UPDATE install 2017-09-04 23:34:38 +08:00
khs1994
4fc19f3234 ADD link Chinese Copywriting Guidelines 2017-09-04 22:12:15 +08:00
khs1994
2232081465 change “” ‘’ to 「」『』 2017-09-04 22:06:11 +08:00
khs1994
ed2830ef50 rm parenthese in line2 2017-09-04 21:21:52 +08:00
khs1994
beea9fae4b link install/mirror.md 2017-09-04 20:05:15 +08:00
Baohua Yang
05b4a078a7 Merge pull request #198 from yeasy/revert-195-master
Revert "fix #186"
2017-09-04 19:31:33 +08:00
Baohua Yang
658a50cbcd Revert "fix #186" 2017-09-04 19:31:17 +08:00
khs1994
b198267022 fix #186 2017-09-04 15:19:13 +08:00
Baohua Yang
f41a7619b2 Merge pull request #195 from khs1994-gitbook/master
Fix #186 and #195
2017-09-04 14:57:52 +08:00
Baohua Yang
19c31d8150 Merge pull request #194 from khs1994/master
UPDATE install with adding more os types
2017-09-04 14:54:19 +08:00
khs1994
8686fdbb7e add travis 2017-09-04 13:31:21 +08:00
khs1994
583494274e add travis 2017-09-04 13:29:26 +08:00
khs1994
83049d8a71 add travis 2017-09-04 13:25:27 +08:00
khs1994
46fc5f3d39 add travis 2017-09-04 13:18:58 +08:00
khs1994
7fccf1b2cd add travis 2017-09-04 12:56:06 +08:00
khs1994
b470de0882 add travis 2017-09-04 12:47:22 +08:00
khs1994
3e5e6bcd75 fix #186 2017-09-04 11:39:33 +08:00
khs1994
7c626d449f ADD Docker CE & Docker EE 2017-09-04 11:19:16 +08:00
khs1994
b4d8cc5230 ADD Docker CE for Windows 10 PC 2017-09-04 11:18:56 +08:00
khs1994
9b6d6fe6f5 UP Docker CE for Debian 2017-09-04 11:18:25 +08:00
khs1994
377a6939d1 UP Docker CE for Ubuntu 2017-09-04 11:18:14 +08:00
khs1994
2cc56f0b82 UP Docker CE for macOS 2017-09-04 11:17:56 +08:00
khs1994
e42e1b9c51 UP Docker CE for CentOS 7 2017-09-04 11:17:39 +08:00
khs1994
c560b6e2fc ADD install debian.md windows.md 2017-09-04 11:16:15 +08:00
khs1994
9a805dffd4 ADD Docker for Windows imgs 2017-09-04 11:15:44 +08:00
Baohua Yang
cd660f8f93 Remove failed qq group number 2017-09-01 11:28:04 +08:00
Baohua Yang
0c27b25a83 Merge pull request #188 from pkking/master
Add new registry mirror from official site
2017-08-21 16:58:07 +08:00
pkking
24001f7b26 1. 增加docker 官方registry mirror的地址
2. 增加新版本检查registry生效的方法

Signed-off-by: pkking <pkwarcraft@gmail.com>
2017-08-21 15:29:02 +08:00
Baohua Yang
32042580ba Merge pull request #187 from silenceper/master
Fix consul name
2017-08-16 13:49:04 +08:00
silenceper
36155d9ba0 fix:单词错误 2017-08-15 15:12:36 +08:00
silenceper
de2f06a21c fix:consel=>consul 2017-08-15 15:11:10 +08:00
Baohua Yang
d8567a6171 Merge pull request #184 from liu4480/master
Update docker-registry repo
2017-07-28 14:13:21 +08:00
Bin Liu
fb75dd8e4d docker-registry is DEPRECATED 2017-07-28 14:06:48 +08:00
Baohua Yang
9686afcf6f Merge pull request #183 from wzcboss/master
Remove ";" in python code
2017-07-25 10:38:38 +08:00
wzcboss
c6245b2455 remove ;in index.py 2017-07-24 17:18:05 +08:00
Baohua Yang
fd8d7ac7ed Merge pull request #179 from alex8866/master
Update tencent cloud introduction
2017-07-18 20:53:59 +08:00
Lingfei Kong
6e0aff86ed change term 你 to 用户 2017-07-18 14:50:06 +08:00
Baohua Yang
c751613c57 Merge pull request #138 from rockcitystore/master
Fix docker registry path to 2.0 by default
2017-07-18 14:27:28 +08:00
Baohua Yang
50ef788efd Merge pull request #182 from leotian/fix-img
Fix missing image
2017-07-17 23:10:48 +08:00
leotian
e7719de38f refactor: image not found 2017-07-17 11:12:42 +08:00
Lingfei Kong
9c83eaa58b 腾讯云已经推出了容器服务,更新容器与云计算章节中的腾讯云部分介绍 2017-07-03 10:40:25 +08:00
Baohua Yang
d6f1b3bde2 Merge pull request #177 from wenfengshi/master
Fix typo and broken links
2017-06-18 14:59:13 +08:00
onephone
65d4e45c5e Fix issue #176: remove the dead links 2017-06-18 14:35:52 +08:00
onephone
f1445d7fb2 完善命令,补充新版本命令说明 2017-06-18 11:35:34 +08:00
onephone
82ecfd499a Fix issue: change github.org to github.com 2017-06-18 09:01:46 +08:00
Baohua Yang
aa3b036630 Merge pull request #175 from shuizhongyueming/f/RUN命令调整
Fix run cmd
2017-06-01 18:50:13 +08:00
shuizhongyueming
8aaf0927d2 修复在ONBUILD章节里面RUN命令的使用错误
在ONBUILD章节里面RUN后面要执行的命令被双引号括起来了
在基于demo提供的Dockerfile来构建镜像时,Docker会报类似"/bin/sh: 1: mkdir /app: not found"的错误
去掉之后就一切正常了
2017-06-01 18:11:18 +08:00
Baohua Yang
44346ba200 Update figure path 2017-05-24 11:44:57 +08:00
Baohua Yang
43f75a28b0 Update v2 registry path 2017-05-24 11:40:47 +08:00
Baohua Yang
bd34ba8077 Update figure location 2017-05-24 11:37:58 +08:00
Baohua Yang
18a91f783e Add os cases 2017-05-24 11:22:23 +08:00
Baohua Yang
b0e680dfe8 Remove unused content 2017-05-24 11:17:11 +08:00
Baohua Yang
212cd0289a Fix issue#174 2017-05-24 11:13:57 +08:00
Baohua Yang
6faf2b7b0e Update swarm and mesos chapter 2017-05-02 23:17:58 +08:00
Baohua Yang
b0c572a9fe Merge pull request #171 from glixingxian/master
Improve nsenter example
2017-05-02 11:31:51 +08:00
Xingxian LI
09d6c9f1a1 improve nsenter example 2017-05-01 16:35:43 +02:00
Baohua Yang
08534241df Merge pull request #170 from shuizhongyueming/master
Update using mirror at MacOS
2017-04-29 22:46:46 +08:00
happy wang
0a0d4a015e 更新mirror.md
新增macOS下配置加速器的方法
2017-04-27 18:53:06 +08:00
Baohua Yang
d7de30ef8a Merge pull request #167 from aleen42/patch-1
Add a plugin `page-treeview`
2017-04-24 16:49:30 +08:00
Aleen
16ef5d63ba Adding a plugin named page-treeview 2017-04-24 15:59:27 +08:00
Baohua Yang
118b26f0a2 Merge pull request #165 from wg1j/master
Fixed url and add footnote to new Docker Store
2017-04-24 10:32:11 +08:00
wg1j
293cd25271 Fixed url and add footnote to new Docker Store 2017-04-22 00:27:44 +08:00
Baohua Yang
121c23e8f1 Add new book link 2017-03-21 09:22:20 +08:00
Baohua Yang
11d7179051 Merge pull request #163 from shijinzhan/patch-1
Add space before title
2017-03-15 11:36:04 +08:00
shijinzhan
33b152c18f 标题细节调整 2017-03-15 09:48:29 +08:00
Baohua Yang
e553c0062b Merge pull request #162 from stenote/patch-1
Update WORKDIR usage
2017-03-14 20:47:39 +08:00
Rui Ma
d032b463e5 Update workdir.md
workdir 可以自动帮忙建立目录
2017-03-14 17:06:48 +08:00
Baohua Yang
c8f2f162ca Merge pull request #161 from Howld/master
Fix typos
2017-03-03 11:29:39 +08:00
Howld
34fc0e801a #160 2017-03-02 19:58:32 +08:00
Baohua Yang
5e7ae549f3 Merge branch 'master' of github.com:yeasy/docker_practice 2017-02-22 10:17:08 +08:00
Baohua Yang
a503c0708c Update china-pub link 2017-02-22 10:17:02 +08:00
Baohua Yang
e38f5be83c Merge pull request #158 from 374632897/master
Fix typos
2017-02-19 16:08:12 +08:00
Jason
394b6622f9 在 -> 再 2017-02-18 22:07:35 +08:00
Jason
aee43fea12 是用 -> 使用 2017-02-18 21:02:39 +08:00
Jason
f4bb30b9f4 至于修改为置于 2017-02-18 14:35:44 +08:00
Baohua Yang
366346e2a9 Merge pull request #157 from twang2218/fix-basic-concept-typo
Fix basic concept chapter's typo, make it clearer
2017-02-16 14:50:48 +08:00
Tao Wang
ef65832291
Fix basic concept chapter's typo, make it clearer
Signed-off-by: Tao Wang <twang2218@gmail.com>
2017-02-16 14:11:24 +11:00
Baohua Yang
a511565933 Merge pull request #155 from gerryke/master
Fix typo
2017-02-10 21:32:17 +08:00
gerryke
80a64ac0a4 修改Entrypoint介绍章节中错别字“远了”为“原来” 2017-02-09 17:12:26 +08:00
Baohua Yang
af4ac70ceb Merge branch 'master' of github.com:yeasy/docker_practice 2017-02-09 09:36:10 +08:00
Baohua Yang
bcd5fa4e58 Add version 2 release news 2017-02-09 09:36:05 +08:00
Baohua Yang
de81226f53 Merge pull request #154 from mzeht/master
Fix format
2017-02-07 22:15:49 +08:00
mzeht
25178fd616 appendix/repo目录下语法格式修改 2017-02-07 22:04:05 +08:00
mzeht
5bc5219fa2 appendix/repo/ubuntu.md语法格式修改 2017-02-07 21:59:32 +08:00
Baohua Yang
275644aa02 Merge pull request #150 from qiuyin/master
Update volume.md
2017-01-26 15:32:06 +08:00
qiuyin
1ab64b2775 Update volume.md 2017-01-26 11:10:42 +09:00
Baohua Yang
453e035885 Merge pull request #149 from qiuyin/master
Update volume, will need more explicit change point info
2017-01-25 20:10:17 +08:00
qiuyin
16247bb8c3 对查看数据卷的具体信息,补充了最新版的内容。 2017-01-21 20:18:39 +09:00
qiuyin
2376e1ea18 Update volume.md 2017-01-20 18:10:20 +09:00
Baohua Yang
5e6073f46e Merge pull request #148 from hkKimWu/master
Fix missing comma
2017-01-13 17:07:31 +08:00
Kim Wu
9f9151580d 改正输入错漏。
CMD ["nginx" "-g" "daemon off;"] -> CMD ["nginx", "-g", "daemon off;"]
2017-01-13 14:21:35 +08:00
yeasy
abce07cda6 Add cloud chapter 2017-01-12 16:11:33 +08:00
Baohua Yang
f5747f6a5c Add cloud chapter 2017-01-12 15:41:14 +08:00
Baohua Yang
b3d6b681cb Add revision and contribute section 2017-01-12 13:25:22 +08:00
Baohua Yang
d3f02b48cf Merge pull request #147 from QwertyJack/master
Fix typo
2017-01-11 17:44:36 +08:00
Baohua Yang
2ae37ecfa5 Add figure 2017-01-11 17:17:49 +08:00
jack@yfy
f6e1be3cc0 a little spelling mistake 2017-01-10 22:30:02 +08:00
Baohua Yang
b0bde1341c release 0.8.0 2017-01-08 22:48:29 +08:00
Baohua Yang
0b23cf591c Merge pull request #146 from JohannLai/master
Fix “Web” to "web",consistent with sub directories
2017-01-06 22:43:35 +08:00
johannlai
93e2d43c4f 修改Web为web,与目录中的命名一致 2017-01-06 15:44:31 +08:00
Baohua Yang
6448a627f6 Fix figure path 2016-12-20 15:47:31 +08:00
Baohua Yang
67fe62b449 Update version number 2016-12-20 15:46:42 +08:00
yeasy
4911fba3e0 Track 2 files into repository.
- untracked _images/docker_primer.png
- removed docker_primer.png

Auto commit by GitBook Editor
2016-12-20 07:26:13 +00:00
yeasy
8e3748cd8d Updates Compose usage 2016-12-20 15:35:52 +08:00
Baohua Yang
54c0f43f19 Merge pull request #145 from twang2218/install-mac
Add Homebrew Cask install method to install/mac.md
2016-12-20 09:56:09 +08:00
Baohua Yang
3d66f42043 Merge pull request #144 from hzwangsiyu/master
Fix typo
2016-12-20 09:55:18 +08:00
Tao Wang
1962354f5f
Add Homebrew Cask install method to install/mac.md
Signed-off-by: Tao Wang <twang2218@gmail.com>
2016-12-20 12:03:56 +11:00
hzwangsiyu
29c0385b12 fix typo 2016-12-20 00:57:27 +08:00
Baohua Yang
a46012033f Merge pull request #141 from xiaoxing598/master
Change term of "internal"
2016-12-15 16:44:50 +08:00
Baohua Yang
ecc493ac96 Merge pull request #140 from chenshenyou/master
Fix issue #139: fix typo, change from 意外 to 以外
2016-12-15 16:44:01 +08:00
Allen
b1cf8d3dc1 修复错误描述 2016-12-15 09:42:50 +08:00
chenshenyou
63d52eba72 Fix issue #139: fix typo, change from 意外 to 以外 2016-12-14 23:12:58 +08:00
Baohua Yang
f2ede78953 Add new QQ group 2016-12-12 10:39:13 +08:00
Baohua Yang
2cfa980930 Add faq to find network veth pair 2016-12-10 17:06:04 +08:00
Baohua Yang
36ab0b9862 Update appendix section 2016-12-10 17:00:25 +08:00
chenan
e8389a46b3 fix:local_repo.md 2016-11-29 10:14:36 +08:00
Baohua Yang
f2d6f998ab Move image mirror introcution to the installation chapter
Fix issue #136.
2016-11-28 11:33:23 +08:00
Baohua Yang
e537012881 Merge pull request #137 from twang2218/update-dockerfile-arg
Add --build-arg doc on Docker 1.13
2016-11-28 11:29:24 +08:00
Baohua Yang
590b0bea31 Merge pull request #135 from twang2218/image-remove
Refine the image remove chapter
2016-11-28 11:25:22 +08:00
Tao Wang
b0330ce1d8 修正 --build-arg 的参数的说明以适应 Docker 1.13 的变化
Signed-off-by: Tao Wang <twang2218@gmail.com>
2016-11-28 10:53:44 +11:00
Tao Wang
bd7b7c18c3 重写删除镜像章节
扩展了删除镜像的信息。
调整GitHub按钮的大小。

Signed-off-by: Tao Wang <twang2218@gmail.com>
2016-11-28 02:29:45 +11:00
Baohua Yang
5230300d30 Merge pull request #132 from twang2218/image-create
Fix image link
2016-11-27 10:39:29 +08:00
Baohua Yang
fa3c55840c Merge pull request #133 from twang2218/fix-issue-131-github-buttons-problem
Fix #8 hide the github button when it's in mobile
2016-11-27 10:37:44 +08:00
Tao Wang
eb66a35128 Fix #8 hide the github button if it's mobile
Signed-off-by: Tao Wang <twang2218@gmail.com>
2016-11-27 07:14:25 +11:00
Tao Wang
3484bb3cf6 修正 image/commit.md 中的图片链接错误
Signed-off-by: Tao Wang <twang2218@gmail.com>
2016-11-27 04:34:38 +11:00
Baohua Yang
710956aed5 Merge pull request #129 from twang2218/install-mac
Use more explicit figure to show registry mirror preference
2016-11-26 18:04:53 +08:00
Baohua Yang
66b81709e7 Merge pull request #128 from twang2218/image-create
Add more content on image creation
2016-11-26 18:03:54 +08:00
Tao Wang
66de644f33 在 Mac 的配置界面上标记出来加速器的配置位置
Signed-off-by: Tao Wang <twang2218@gmail.com>
2016-11-26 19:11:40 +11:00
Tao Wang
5aec4fae19 重写定制镜像章节
由于定制镜像是 Docker 使用环境的重中之重,因此将原来的 `image/create.md` 扩展为4篇:`image/commit.md`, `image/build.md`, `image/dockerfile/*`, `image/other.md`。其中 `dockerfile` 进一步扩展,包括大部分指令详解。

由于 `image/dockerfile/*` 已经涵盖了 `dockefile/*` 的内容,并且增加了很多。因此去掉了原有的 `dockerfile/` 章节。从另一个角度来看,相当于是将后续 `dockerfile` 章节前移。
Dockerfile 是镜像构建必须掌握的技能,在介绍镜像定制的时候,就应该将其详细讲解。

将 `image/save_load.md` 合并到 `image/other.md` 并重写。docker import, export, save, load 是不常使用的命令,他们是早期 Docker 生态环境不完善的时候留下来的东西,现在已经不推荐使用,因此将这些方法合并到一篇里作为了解即可。

Signed-off-by: Tao Wang <twang2218@gmail.com>
2016-11-26 05:02:43 +11:00
Baohua Yang
5cd720a388 Update compose 2016-11-25 22:24:48 +08:00
yeasy
5291db9ad4 Updates kubernetes/README.md 2016-11-25 22:21:21 +08:00
yeasy
414a7cd087 Updates SUMMARY.md
Auto commit by GitBook Editor
2016-11-25 22:19:47 +08:00
Baohua Yang
5385a8b0dc Merge pull request #127 from twang2218/update-book-json
Update book.json
2016-11-23 16:44:45 +08:00
Tao Wang
4aec4f9d7a 更新 book.json,代码色彩高亮换为默认的 highlight,并去除已经不再使用的 autocover 等
Signed-off-by: Tao Wang <twang2218@gmail.com>
2016-11-23 16:55:24 +11:00
Baohua Yang
ff5eb9d96a Merge pull request #126 from sugov5/master
Add how to use registry mirror on Win 10
2016-11-18 13:18:53 +08:00
TRISTAN-TK\Tristan_Liu
34a0655774 调整验证mirror配置的说明,验证方法只在Linux下生效。Windows下的验证方法暂时不知道 2016-11-17 21:42:30 +08:00
TRISTAN-TK\Tristan_Liu
72fbb7ed15 镜像加速器添加windows10配置说明 2016-11-17 21:36:22 +08:00
Baohua Yang
efb0afd0d9 Update minor version number 2016-11-15 14:30:38 +08:00
Baohua Yang
e84a08c4f2 Merge pull request #123 from twang2218/image-list
Add more details on image operations
2016-11-15 14:29:37 +08:00
Baohua Yang
d816cd15ad Merge pull request #124 from twang2218/install-mac
Add missing figures
2016-11-15 14:28:44 +08:00
Baohua Yang
48bf98a77b Merge pull request #125 from twang2218/namespace
Refine the term of 'namespace'
2016-11-15 14:28:24 +08:00
Tao Wang
a37cf1b88c 将 "名字空间" 改为 "命名空间"
Namespace 术语一般的翻译是"命名空间",参见 <https://zh.wikipedia.org/zh-cn/%E5%91%BD%E5%90%8D%E7%A9%BA%E9%97%B4>

Signed-off-by: Tao Wang <twang2218@gmail.com>
2016-11-15 06:56:29 +11:00
Tao Wang
f3be1fe1f5 重新改写"镜像列表"章节
更新命令结果,并添加更多的内容。

Signed-off-by: Tao Wang <twang2218@gmail.com>
2016-11-15 06:40:27 +11:00
Tao Wang
4a114902d6 标出需要注意的图标,之前的提交忘记添加标注了。 2016-11-14 03:24:24 +11:00
Baohua Yang
3e0c0c6ef6 Merge pull request #121 from twang2218/install-merge
Merge installation steps on Ubuntu and Debian
2016-11-13 23:03:15 +08:00
Baohua Yang
20d632465b Merge pull request #122 from twang2218/install-mirror
Add more refs to registry mirror
2016-11-13 23:02:15 +08:00
Baohua Yang
f1b622ebfd Update pull.md 2016-11-13 23:01:49 +08:00
Baohua Yang
28cfc39b9c Update repository.md 2016-11-13 23:01:25 +08:00
Tao Wang
fc5d514ec1 添加关于加速器配置章节的引用。 2016-11-13 18:39:24 +11:00
Tao Wang
8889a6c8c3 修复笔误
Signed-off-by: Tao Wang <twang2218@gmail.com>
2016-11-13 18:29:14 +11:00
Tao Wang
45cdd756eb 合并 Ubuntu、Debian 安装文档
Ubuntu 和 Debian 系统的安装文档很相似,大部分可以共享,因此合并两个安装文档。
2016-11-13 18:24:59 +11:00
Baohua Yang
a119a30fa5 Merge pull request #118 from twang2218/image-pull
Refine image pull chapter
2016-11-13 09:01:29 +08:00
Baohua Yang
157923420f Merge branch 'twang2218-install-mirror' 2016-11-13 09:00:08 +08:00
Baohua Yang
48badeb0a0 Merge branch 'install-mirror' of https://github.com/twang2218/docker_practice into twang2218-install-mirror 2016-11-13 08:59:52 +08:00
Baohua Yang
3f0b68c21d Update mirror.md 2016-11-13 08:55:29 +08:00
Baohua Yang
6c60ad459c Merge pull request #119 from twang2218/install-mac
Add installation on MacOS
2016-11-13 08:54:10 +08:00
Tao Wang
f4e95e1215 添加配置加速器章节
由于伟大的墙,国内使用 Docker 需要配置加速器才可以访问 Docker Hub,这里添加配置加速器的章节。
2016-11-13 06:48:40 +11:00
Tao Wang
aee6aa8fe6 添加 "macOS 安装文档" 2016-11-13 04:08:44 +11:00
Tao Wang
3f41302794 改进'获取镜像'章节
修正一些表达,以及扩展更多信息。
关于下载缓慢的问题,改为推荐使用加速器,这样可以始终保持官方维护的新版本。因此在前面的安装章节将来需要补充一些安装配置的内容,包括加速器的设置。
2016-11-11 17:22:30 +11:00
Baohua Yang
6fd3097bd9 Merge pull request #117 from twang2218/sh-to-bash
Use bash in grammar marker instead of sh for better compatibility.
2016-11-11 10:23:39 +08:00
Tao Wang
df94a6e1fb 将所有的 "``sh" 替换为 "``bash"
这样更兼容 prism 避免报错。
2016-11-10 22:48:32 +11:00
Baohua Yang
d8be8f15a9 Merge pull request #116 from twang2218/install-centos
Refine Docker installation on CentOS
2016-11-10 17:39:23 +08:00
Baohua Yang
c5ac987475 Merge pull request #115 from twang2218/install-debian
Refine the installation on Debian
2016-11-10 17:38:54 +08:00
Tao Wang
d8858e5e3d 重写 CentOS 安装章节
按照 Ubuntu 结构重写 CentOS 安装章节。
去除 CentOS 6,因为已经不再被支持。
2016-11-10 08:55:43 +11:00
Tao Wang
c7c5731104 重写 'Debian 安装文档' 并改进 'Ubuntu 安装文档'
参照 Ubuntu 文档结构重写 Debian 的文档,很多内容很相似,或许将来有可能将二者合并。
2016-11-10 05:32:55 +11:00
Baohua Yang
65a1e69462 Merge pull request #114 from WALL-E/fix/nsenter
Update new version nsenter cmd
2016-11-09 22:02:16 +08:00
zhangzheng
e2158ef4fd update nsenter comment and download link 2016-11-09 16:16:46 +08:00
Baohua Yang
5b03c5d974 Merge pull request #112 from twang2218/install-ubuntu
Refine installation on Ubuntu
2016-11-09 11:23:37 +08:00
Tao Wang
442f829ef5 改进 Ubuntu 安装文档
去除 Ubuntu 15.10 的信息,Ubuntu 15.10 的软件生存周期已经结束;
用表格替代命令获取Ubuntu codename 的方式;
以及扩展更多的信息。
2016-11-09 06:18:30 +11:00
Baohua Yang
c4028b0016 Merge pull request #110 from twang2218/basic_concept
Refine the basic concept part
2016-11-08 11:17:02 +08:00
Tao Wang
01ff5ca004 修改一些笔误 2016-11-08 08:57:30 +11:00
Tao Wang
bdab0474c4 重写基础概念章节 2016-11-08 07:10:11 +11:00
Baohua Yang
46be5458ef Merge pull request #109 from twang2218/introduction-why
Add more content on why adopt Docker
2016-11-07 10:51:17 +08:00
Tao Wang
97d8e43b49 扩展 "为什么要使用 Docker" 文档
让文档更结构化,并且调整补充更多的信息
2016-11-07 07:00:17 +11:00
Baohua Yang
bf3100e68f Merge pull request #108 from twang2218/introduction-what
Add more info on Docker startup
2016-11-06 18:43:24 +08:00
Baohua Yang
57e97c6375 Fix ref link to wiki 2016-11-06 18:42:34 +08:00
Tao Wang
5c66e377f8 补充"什么是Docker"的信息,并且调整文字叙述顺序。 2016-11-06 06:52:43 +11:00
Baohua Yang
a63448d447 Add new group number 2016-10-29 11:30:26 +08:00
Baohua Yang
4fdbb1ee33 Merge pull request #107 from WALL-E/fix/swarm
Fix typo
2016-10-27 15:02:04 +08:00
zhangzheng
9fd3717645 fix the spelling mistakes 2016-10-27 10:34:02 +08:00
Baohua Yang
8437b4fd1f Merge pull request #106 from WALL-E/fix/compose
Fix  haproxy config in compose usage example
2016-10-25 17:26:48 +08:00
zhangzheng
3d9982357b fix compose usage, about haproxy config 2016-10-25 16:10:36 +08:00
Baohua Yang
b0626d8de8 Add new qq group 2016-09-28 16:50:48 +08:00
Baohua Yang
e7fffbae3a Merge pull request #104 from muicoder/master
Prettify cmd_logic.png
2016-09-21 14:26:01 +08:00
muicoder
8a68bf2108 prettify cmd_logic.png 2016-09-21 13:28:35 +08:00
Baohua Yang
7052c162e3 Merge pull request #103 from muicoder/master
Add color to cmd_logic figure
2016-09-20 22:06:30 +08:00
muicoder
73161f3758 cmd_logic 2016-09-20 17:57:15 +08:00
Baohua Yang
549d13b717 Merge pull request #102 from likang/patch-1
Use better terminologies
2016-09-14 14:23:42 +08:00
Kang Li
dcb2cfe246 better translations
Sorry I don't know much about the word 'save-out', but here are some common translations of docker commands in Chinese:

save: 保存
load: 加载
export: 导出 
import: 导入

It seems that there is a big difference between 'save' and 'export' in Docker, it will be great if you make a detail explanation :P
2016-09-14 13:37:21 +08:00
Kang Li
e4e10ead0f fix typo 2016-09-13 16:37:59 +08:00
Baohua Yang
4e70ce8578 Add new discuss group number 2016-09-02 14:39:25 +08:00
Baohua Yang
8a2846741b Merge pull request #100 from vra/master
Add missing period
2016-08-24 10:05:07 +08:00
Yunfeng Wang
18f3c52ba8 在句尾增加句号 2016-08-23 22:41:26 +08:00
Baohua Yang
d894237ab5 Merge pull request #99 from muicoder/master
Update container event states
2016-08-20 12:27:07 +08:00
muicoder
a4de63b13f Official container event states 2016-08-20 12:05:51 +08:00
Baohua Yang
66e3bfcb6f Merge pull request #98 from muicoder/master
Update cmd_logic.png image
2016-08-09 20:04:55 +08:00
tangyang
efef4590b6 fix "cmd_logic.png" image 2016-08-09 17:58:50 +08:00
Baohua Yang
36b9f63707 Merge pull request #97 from liu4480/master
Fix typo
2016-08-08 15:00:08 +08:00
Bin Liu
0c6490c510 change "回头" to "回收" in meos/architecture.md 2016-08-08 14:47:13 +08:00
Baohua Yang
accd03a8e9 Merge pull request #96 from liu4480/master
Fix a description in iptables
2016-08-08 11:17:56 +08:00
Bin Liu
8e0137347b fix a description in iptables 2016-08-08 09:53:53 +08:00
Baohua Yang
1fdc0dd63d Merge pull request #95 from muicoder/master
Fix image links and booting cmd
2016-08-07 11:59:19 +08:00
tangyang
7aab504ecb fix "fig chapter" image links 2016-08-07 11:40:47 +08:00
tangyang
6be8a72e81 Update fig-example-large.gif => fig-example-large.png 2016-08-07 11:27:18 +08:00
tangyang
a0f18930f3 For "-d", read "--rm" 2016-08-07 11:26:02 +08:00
tangyang
3c9695f9c1 fix "kubernetes chapter" image links 2016-08-07 11:24:04 +08:00
Baohua Yang
4e6a59ebc5 update cmd logic figure 2016-08-06 21:44:57 +08:00
Baohua Yang
26a6004ee5 update cmd logic figure 2016-08-06 21:41:23 +08:00
Baohua Yang
6ce541c063 Update with latest docker version 2016-08-06 17:55:09 +08:00
Baohua Yang
375512ec17 Add new cover page 2016-08-06 12:44:41 +08:00
Baohua Yang
6076ac618a Add node module to git ignore list 2016-08-06 12:40:53 +08:00
Baohua Yang
85c9b33621 Update book style 2016-08-06 10:59:01 +08:00
Baohua Yang
dede6be4d3 Merge pull request #93 from Pandoraemon/patch-1
Fix table format
2016-08-04 16:05:21 +08:00
Pandoraemon
3ed9e56dc3 表格的修订
表格显示有问题。
2016-08-04 14:41:40 +08:00
Baohua Yang
507ae54044 Update new group number 2016-07-30 17:57:27 +08:00
Baohua Yang
1ef669b5e7 Merge pull request #91 from vra/patch-1
Add period symbol
2016-07-30 17:47:53 +08:00
Yunfeng Wang
c0d6cc88d7 在句尾增加句号 2016-07-30 10:50:00 +08:00
Baohua Yang
69d34f7607 Merge pull request #90 from vra/master
Fix expression
2016-07-29 17:43:01 +08:00
Yunfeng Wang
904fb90f5b 修改句式错误
根据上下文,将`写着`改成了`写成`
2016-07-29 15:09:35 +08:00
Baohua Yang
308f8c6f5a Merge pull request #88 from dangzhiqiang/master
Fix listed elements
2016-07-18 14:58:26 +08:00
Baohua Yang
18bd64b147 Merge pull request #89 from airacle/master
Fix typo: 084 => 124
2016-07-18 14:57:34 +08:00
airacle
7b68db9dc6 084 => 124 2016-07-14 22:15:53 +08:00
dangzhiqiang
7c9ceaa4dc 更改列表显示格式
修复列表显示格式,之前版本会导致生成的PDF会多出一行,并且增加不必要的缩进。
.md格式显示也会多出一个短横线“-”。
2016-07-14 11:33:00 +08:00
Baohua Yang
2ccf861503 Merge pull request #87 from Novtopro/master
Update term
2016-06-17 20:28:22 +08:00
Novtopro He
1c4d30c374 名字空间 -> 命名空间 2016-06-17 11:07:18 +08:00
Baohua Yang
1af242e154 Add new group number 2016-06-15 16:03:47 +08:00
385 changed files with 12345 additions and 5318 deletions

View File

@ -0,0 +1,22 @@
// https://code.visualstudio.com/docs/remote/devcontainerjson-reference
{
"image": "yeasy/docker_practice:latest",
"mounts": [
"source=dp-code-remote-cache,target=/root/.vscode-server,type=volume"
],
"settings": {
"terminal.integrated.shell.linux": "/bin/sh"
},
"forwardPorts": [
4000
],
"runArgs": [
"--cap-add=SYS_ADMIN"
],
"postStartCommand": [
"sh",
"-cx",
"pwd ; cd /workspaces/docker_practice ; mkdir -p ${PWD}/node_modules; mkdir -p ${PWD}/_book; mount --bind /srv/gitbook/node_modules ${PWD}/node_modules ; mount --bind /mnt ${PWD}/_book"
]
}

11
.docker/docker-entrypoint.sh Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env sh
echo
echo
echo "Please open your browser: 127.0.0.1:4000"
echo
echo "欢迎加入 QQ 群:【 145983035 】 分享 Docker 资源,交流 Docker 技术"
echo
echo
exec nginx -g "daemon off;"

15
.drone.yml Normal file
View File

@ -0,0 +1,15 @@
kind: pipeline
type: docker
name: build
steps:
- name: build
image: yeasy/docker_practice:latest
pull: if-not-exists # always never
environment:
TZ: Asia/Shanghai
commands:
- docker-entrypoint.sh build
trigger:
branch:
- master

29
.editorconfig Normal file
View File

@ -0,0 +1,29 @@
# EditorConfig is awesome: https://EditorConfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[*.py]
indent_size = 4
[Makefile]
indent_style = tab

5
.gitattributes vendored Normal file
View File

@ -0,0 +1,5 @@
* text=auto
*.sh text eol=lf
* linguist-language=go

39
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,39 @@
* @yeasy @khs1994
/.github/* @khs1994
/.travis/* @khs1994
/.vuepress/* @khs1994
/advanced_network/* @yeasy @khs1994
/appendix/* @yeasy @khs1994
/archive/* @khs1994
/basic_concept/* @yeasy @khs1994
/buildx/* @khs1994
/cases/* @yeasy @khs1994
/cloud/* @khs1994
/compose/* @yeasy @khs1994
/container/* @yeasy @khs1994
/coreos/* @khs1994
/data_management/* @khs1994
/etcd/* @khs1994
/IDE/* @khs1994
/image/* @yeasy @khs1994
/install/* @khs1994
/introduction/* @yeasy @khs1994
/kubernetes/* @yeasy @khs1994
/network/* @yeasy @khs1994
/opensource/* @khs1994
/repository/* @khs1994
/security/* @yeasy @khs1994
/underly/* @yeasy @khs1994
/.drone.yml @khs1994
/.editorconfig/ @khs1994
/.gitattributes @khs1994
/.gitignore @khs1994
/_config.yml @yeasy @khs1994
/book.json @yeasy @khs1994
/CHANGELOG.md @yeasy @khs1994
/CONTRIBUTING.md @yeasy @khs1994
/docker-compose.yml @khs1994
/manifest @khs1994
/package.json @khs1994
/README.md @yeasy @khs1994
/SUMMARY.md @yeasy @khs1994

13
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,13 @@
# These are supported funding model platforms
github: yeasy
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

41
.github/ISSUE_TEMPLATE/Bug_report.md vendored Normal file
View File

@ -0,0 +1,41 @@
---
name: Bug report
about: Create a report to help us improve
---
* [ ] Have u googled the problem? If no, pls do that first!
### Environment
<!--请提供环境信息包括操作系统版本等保留你的操作系统其他选项删除-->
<!--Provides env info like OS version-->
* [x] Linux
* [x] CentOS 7
* [x] Fedora
* [x] Ubuntu 16.04 +
* [x] Debian 9 +
* [x] macOS
* [x] Windows 10
* [x] Raspberry Pi (ARM)
* [x] Others (Pls describe below)
### Docker Version
<!--如果你的 Docker 版本低于 20.10 请尽可能升级到该版本保留你的 Docker 版本其他选项删除-->
<!--if Docker version under 20.10, please upgrade Docker to 20.10-->
* [x] Test (v20.10)
* [x] Stable (v20.10)
* [x] 1.13.0 or Before
### Problem Description
<!--描述你的问题请贴出操作步骤终端报错截图或文字信息-->
<!--describe problem with detailed steps and logs-->
<!--提交问题之前请点击预览标签符合要求之后再提交问题-->

41
.github/ISSUE_TEMPLATE/Custom.md vendored Normal file
View File

@ -0,0 +1,41 @@
---
name: Custom issue template
about: Create a issue about Docker
---
* [ ] Have u googled the problem? If no, pls do that first!
### Environment
<!--请提供环境信息包括操作系统版本等保留你的操作系统其他选项删除-->
<!--Provides env info like OS version-->
* [x] Linux
* [x] CentOS 7
* [x] Fedora
* [x] Ubuntu 16.04 +
* [x] Debian 9 +
* [x] macOS
* [x] Windows 10
* [x] Raspberry Pi (ARM)
* [x] Others (Pls describe below)
### Docker Version
<!--如果你的 Docker 版本低于 20.10 请尽可能升级到该版本保留你的 Docker 版本其他选项删除-->
<!--if Docker version under 20.10, please upgrade Docker to 20.10-->
* [x] Test (v20.10)
* [x] Stable (v20.10)
* [x] 1.13.0 or Before
### Problem Description
<!--描述你的问题请贴出操作步骤终端报错截图或文字信息-->
<!--describe problem with detailed steps and logs-->
<!--提交问题之前请点击预览标签符合要求之后再提交问题-->

View File

@ -0,0 +1,5 @@
---
name: Feature request
about: Suggest an idea for docker_practice
---

20
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,20 @@
<!--
Thanks for your contribution.
See [CONTRIBUTING](CONTRIBUTING.md) for contribution guidelines.
-->
**Proposed changes (Mandatory)**
<!--
Tell us what you did and why:
One line short description
And details in other paragraphs.
-->
**Fix issues (Optional)**
<!--
Tell us what issues you fixed, e.g., fix #123
-->

65
.github/workflows/check-link.yml vendored Normal file
View File

@ -0,0 +1,65 @@
name: Check link
on:
workflow_dispatch:
jobs:
check-link:
name: check-link
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
# search Issues :-(
- run: |
docker run -i --rm \
-v $PWD:/mnt:ro \
dkhamsing/awesome_bot \
--white-list "localhost","0.0.0.0",\
"server","example.com","docker",\
"docker.domain.com","YourIP","register",\
"172.16.238.100","172.16.238.101","172.16.238.102",\
"192.168.199.100",\
"github.com/settings",\
"github.com/docker/compose/releases/download",\
"github.com/etcd-io/etcd/releases/download",\
"github.com/tianon/gosu/releases/download",\
"github.com/yeasy/docker_practice",\
"github.com/AliyunContainerService/k8s-for-docker-desktop/raw",\
"dl-cdn.alpinelinux.org/alpine/edge/testing",\
"www.w3.org/1999/xhtml",\
"cr.console.aliyun.com",\
"cloud.tencent.com",\
"nodejs.org/dist/",\
"c.163.com/hub",\
"drone.yeasy.com",\
"docs.docker.com",\
"dockerhub.azk8s.cn",\
"reg-mirror.qiniu.com",\
"registry.docker-cn.com",\
"mirror.ccs.tencentyun.com",\
"vuepress.mirror.docker-practice.com",\
"mc.qcloudimg.com/static/img",\
"www.daocloud.io/mirror",\
"download.docker.com",\
"www.ubuntu.com",\
"archive.ubuntu.com",\
"security.ubuntu.com/ubuntu",\
"nginx.com",\
"img.shields.io/github/release/yeasy/docker_practice",\
"launchpad.net",\
"www.w3.org/1999",\
"chat.freenode.net",\
"en.wikipedia.org/wiki/UnionFS",\
"product.china-pub.com",\
"union-click.jd.com",\
"x.x.x.x/base",\
"x.x.x.x:9090",\
"yeasy.gitbooks.io",\
"download.fastgit.org",\
"www.aliyun.com" \
--allow-dupe \
--skip-save-results \
-t 10 \
`find . \( -path "./mesos" -o -path "./swarm_mode" \) -prune -o -name "*.md" -exec ls {} \;`
name: check-link
timeout-minutes: 25

156
.github/workflows/ci.yaml vendored Normal file
View File

@ -0,0 +1,156 @@
name: CI
on:
push:
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash --noprofile --norc -exo pipefail {0}
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- name: Build Gitbook
uses: docker://yeasy/docker_practice
with:
args: build
- name: Build Gitbook Docker Image
if: github.repository == 'docker-practice/docker_practice'
run: |
sudo chmod -R 777 _book
echo "FROM nginx:alpine" >> Dockerfile
echo "COPY _book /usr/share/nginx/html" >> Dockerfile
echo "COPY .docker/docker-entrypoint.sh /" >> Dockerfile
echo "ENTRYPOINT [\"/docker-entrypoint.sh\"]" >> Dockerfile
export VCS_REF=`git rev-parse --short HEAD`
docker build \
-t dockerpracticesig/docker_practice \
-t dockerpracticesig/docker_practice:gitbook \
--label org.opencontainers.image.revision=$VCS_REF \
--label org.opencontainers.image.source="https://github.com/yeasy/docker_practice" \
--label maintainer="https://github.com/docker-practice" \
.
docker run -d --rm -p 4000:80 dockerpracticesig/docker_practice
sleep 5
echo "::group::Test"
curl 127.0.0.1:4000
echo "::endgroup::"
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push dockerpracticesig/docker_practice
docker push dockerpracticesig/docker_practice:gitbook
env:
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
- name: Upload Gitbook dist
uses: docker://pcit/pages
if: github.repository == 'docker-practice/docker_practice'
env:
PCIT_EMAIL: khs1994@khs1994.com
PCIT_GIT_TOKEN: ${{ secrets.PCIT_GIT_TOKEN }}
PCIT_GIT_URL: github.com/docker-practice/zh-cn
PCIT_KEEP_HISTORY: "true"
PCIT_LOCAL_DIR: _book
PCIT_MESSAGE: Build from yeasy/docker_practice@${{github.sha}}
PCIT_TARGET_BRANCH: master
PCIT_USERNAME: khs1994
- name: vuepress
run: |
export NODE_OPTIONS=--openssl-legacy-provider
sudo rm -rf _book
npm i
git clone https://github.com/docker-practice/.vuepress .vuepress2
cp -r .vuepress2/. .vuepress/
rm -rf .vuepress2
find . \( -path "./mesos" -o -path "./swarm_mode" -o -path "./node_modules" -o -path "./.vuepress" -o -path "./_book" -o -path "./CHANGELOG.md" -o -path "./CONTRIBUTING.md" \) -prune -o -name "*.md" -exec sed -i 'N;2a\<AdSenseTitle/>\n' {} \;
npx vuepress --version
npm run vuepress:build
echo "vuepress.mirror.docker-practice.com" > .vuepress/dist/CNAME
cp -r _images .vuepress/dist
cp -r advanced_network/_images .vuepress/dist/advanced_network
cp -r appendix/_images .vuepress/dist/appendix
cp -r cases/ci/drone/_images .vuepress/dist/cases/ci/drone
cp -r cases/os/_images .vuepress/dist/cases/os
cp -r cloud/_images .vuepress/dist/cloud
cp -r data_management/_images .vuepress/dist/data_management
cp -r etcd/_images .vuepress/dist/etcd
cp -r image/_images .vuepress/dist/image
cp -r install/_images .vuepress/dist/install
cp -r introduction/_images .vuepress/dist/introduction
cp -r kubernetes/_images .vuepress/dist/kubernetes
cp -r underly/_images .vuepress/dist/underly
echo "include: [_images]" > .vuepress/dist/_config.yml
- name: Upload Vuepress dist
uses: docker://pcit/pages
if: github.repository == 'docker-practice/docker_practice'
env:
PCIT_EMAIL: khs1994@khs1994.com
PCIT_GIT_TOKEN: ${{ secrets.PCIT_GIT_TOKEN }}
PCIT_GIT_URL: github.com/docker-practice/vuepress
PCIT_KEEP_HISTORY: "true"
PCIT_LOCAL_DIR: .vuepress/dist
PCIT_MESSAGE: Build from yeasy/docker_practice@${{github.sha}}
PCIT_TARGET_BRANCH: master
PCIT_USERNAME: khs1994
# - name: Set coding.net CNAME
# run: |
# echo "vuepress.mirror.docker-practice.com" > .vuepress/dist/CNAME
# - name: Upload Vuepress dist to coding.net
# uses: docker://pcit/pages
# if: github.repository == 'docker-practice/docker_practice'
# env:
# PCIT_EMAIL: khs1994@khs1994.com
# PCIT_GIT_TOKEN: ${{ secrets.CODING_GIT_TOKEN }}
# PCIT_GIT_URL: e.coding.net/dpsigs/docker_practice
# PCIT_KEEP_HISTORY: "true"
# PCIT_LOCAL_DIR: .vuepress/dist
# PCIT_MESSAGE: Build from yeasy/docker_practice@${{github.sha}}
# PCIT_TARGET_BRANCH: master
# PCIT_USERNAME: ptt0xjqzbke3
- name: Build vuepress docker image
if: github.repository == 'docker-practice/docker_practice'
run: |
sudo rm -rf .vuepress/dist/.git
echo "FROM nginx:alpine" > Dockerfile
echo "COPY .vuepress/dist /usr/share/nginx/html" >> Dockerfile
echo "COPY .docker/docker-entrypoint.sh /" >> Dockerfile
echo "ENTRYPOINT [\"/docker-entrypoint.sh\"]" >> Dockerfile
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
VCS_REF=`git rev-parse --short HEAD`
docker build -t dockerpracticesig/docker_practice:vuepress \
--label org.opencontainers.image.revision=$VCS_REF \
--label org.opencontainers.image.source="https://github.com/yeasy/docker_practice" \
--label maintainer="https://github.com/docker-practice" \
.
docker push dockerpracticesig/docker_practice:vuepress
docker run -it --rm -d -p 4001:80 dockerpracticesig/docker_practice:vuepress
sleep 5
echo "::group::Test"
curl 127.0.0.1:4001
echo "::endgroup::"
env:
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}

5
.gitignore vendored
View File

@ -6,3 +6,8 @@ _book/
*.swp
*.edx
.DS_Store
node_modules/
package-lock.json
docker-compose.override.yml

26
.travis/Dockerfile Normal file
View File

@ -0,0 +1,26 @@
FROM node:14.4.0-alpine
ENV TZ=Asia/Shanghai
WORKDIR /srv/gitbook
COPY book.json book.json
COPY docker-entrypoint.sh /usr/local/bin/
RUN set -x && apk add --no-cache \
tzdata bash \
&& 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

37
.travis/book.json Normal file
View File

@ -0,0 +1,37 @@
{
"title": "Docker -- 从入门到实践",
"author": "yeasy",
"language": "zh-hans",
"links": {
"sidebar": {
"GitHub": "https://github.com/yeasy/docker_practice"
}
},
"plugins": [
"-livereload",
"image-captions",
"github",
"page-treeview@2.9.8",
"editlink"
],
"pluginsConfig": {
"image-captions": {
"attributes": {
"width": "600"
},
"caption": "图 _PAGE_LEVEL_._PAGE_IMAGE_NUMBER_ - _CAPTION_"
},
"github": {
"url": "https://github.com/yeasy/docker_practice"
},
"editlink": {
"base": "https://github.com/yeasy/docker_practice/blob/master/",
"label": "编辑本页"
},
"page-treeview": {
"copyright": "Copyright &#169; yeasy",
"minHeaderCount": "2",
"minHeaderDeep": "2"
}
}
}

43
.travis/conf.d/nginx.conf Normal file
View File

@ -0,0 +1,43 @@
user root;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
index index.html index.php;
server {
server_name localhost;
listen 4000;
root /srv/www/;
index index.html;
}
}

View File

@ -0,0 +1,5 @@
sut:
build: .
volumes:
- ../:/srv/gitbook-src
command: build

23
.travis/docker-entrypoint.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
START=`date "+%F %T"`
if [ $1 = "sh" ];then sh ; exit 0; fi
rm -rf node_modules _book
srcDir=$PWD
cp -a . /srv/gitbook
cd /srv/gitbook
main(){
if [ "$1" = build ];then
gitbook build && cp -a _book $srcDir && echo $START && date "+%F %T" && exit 0
else
exec gitbook serve
fi
}
main $1 $2 $3

8
.travis/update.sh Executable file
View File

@ -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

3
.vuepress/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/*
!.gitignore
!config.js

462
.vuepress/config.js Normal file
View File

@ -0,0 +1,462 @@
const { config } = require('vuepress-theme-hope')
module.exports = config({
title: 'Docker 从入门到实践',
base: '/',
head: [['script', {}, `
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?81a3490c9cd141dbcf6d00bc18b6edae";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
`],
[
'script', {}, `
(function(){
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
}
else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(bp, s);
})();
`
]
],
plugins: {
// sitemap: {
// hostname: 'https://vuepress.mirror.docker-practice.com'
// },
// 'git-log': {
// additionalArgs: '--no-merge',
// onlyFirstAndLastCommit: true,
// },
},
locales: {
"/": {
lang: "zh-CN"
}
},
themeConfig: {
blog: false,
// comment: false,
comment: {
type: "disable", // 使用 Valine
appId: "...", // your appId
appKey: "...", // your appKey
},
pageInfo: [
// 'author',
'reading-time',
'word',
],
footer: {
content: "Made with <a target='_blank' href='https://github.com/vuepress-theme-hope/vuepress-theme-hope'>vuepress-theme-hope</a>",
display: true,
copyright: false,
},
searchPlaceholder: 'Search',
repo: 'yeasy/docker_practice',
repoLabel: 'GitHub',
repoDisplay: true,
hostname: 'https://vuepress.mirror.docker-practice.com',
// author: 'yeasy',
mdEnhance: {
lineNumbers: true,
},
git: {
contributor: false,
},
themeColor: {
blue: '#2196f3',
// red: '#f26d6d',
// green: '#3eaf7c',
// orange: '#fb9b5f'
},
locales: {
"/": {
lang: "zh-CN"
}
},
darkmode: 'auto-switch',
//
showAds: true,
docsRepo: 'yeasy/docker_practice',
docsDir: '/',
docsBranch: 'master',
editLinks: true,
nav: [
{
text: '微信交流群',
link: 'https://docker_practice.gitee.io/pic/dpsig-wechat.jpg',
},
{
text: '小程序',
link: 'https://docker_practice.gitee.io/pic/dp-wechat-miniprogram.jpg',
},
{
text: '安装 Docker',
link: '/install/',
},
{
text: 'Docker 入门',
link: '/'
},
{
text: 'Docker 实战',
link: '/cases/os/'
},
{
text: 'CI/CD',
link: '/cases/ci/'
},
{
text: 'Compose',
link: '/compose/',
},
{
text: 'Kubernetes',
link: '/kubernetes/',
},
{
text: "云计算",
link: "/cloud/",
},
// {
// text: 'GitHub',
// link: 'https://github.com/yeasy/docker_practice'
// },
// {
// text: '捐赠',
// link: ''
// },
{
text: '云服务器99/元首年特惠',
link: 'https://cloud.tencent.com/act/cps/redirect?redirect=1062&cps_key=3a5255852d5db99dcd5da4c72f05df61&from=console'
},
// {
// text: '语言',
// items: [{
// text: 'English',
// link: ''
// }]
// }
],
sidebar: {
'/cloud/': [
'intro',
'tencentCloud',
'alicloud',
'aws',
'summary',
],
'/kubernetes/': [
'intro',
'concepts',
'design',
{
title: "部署 Kubernetes",
collapsable: true,
children: [
"setup/",
"setup/kubeadm",
"setup/docker-desktop",
"setup/systemd",
"setup/dashboard",
]
},
{
title: "Kubernetes 命令行 kubectl",
collapsable: true,
children: [
'kubectl/'
]
}
],
'/compose/': [
'introduction',
'v2',
'install',
'usage',
'commands',
'compose_file',
'django',
'rails',
'wordpress',
'lnmp',
],
'/install/': [
'ubuntu',
'debian',
'fedora',
'centos',
'raspberry-pi',
// 'offline',
'mac',
'windows',
'mirror',
'experimental',
],
'/cases/os/': [
{
title: "操作系统",
collapsable: false,
children: [
'busybox',
'alpine',
'debian',
'centos',
'summary',
],
},
{
title: "在 IDE 中使用 Docker",
collapsable: false,
children: [
'/ide/',
'/ide/vsCode',
],
},
],
'/cases/ci/': [
'actions/',
{
title: "Drone",
collapsable: true,
children: [
'drone/',
'drone/install'
]
},
],
'/': [
'/',
'/CHANGELOG',
'/CONTRIBUTING',
{
title: "Docker 简介",
collapsable: false,
children: [
'introduction/',
'introduction/what',
'introduction/why',
]
}, {
title: "基本概念",
collapsable: false,
children: [
'basic_concept/',
'basic_concept/image',
'basic_concept/container',
'basic_concept/repository'
]
},
{
title: "使用镜像",
collapsable: false,
children: [
'image/',
'image/pull',
'image/list',
'image/rm',
'image/commit',
'image/build',
'image/other.md',
'image/internal.md',
]
},
{
title: 'Dockerfile',
collapsable: true,
children: [
"image/dockerfile/",
'image/dockerfile/copy',
'image/dockerfile/add',
'image/dockerfile/cmd',
'image/dockerfile/entrypoint',
'image/dockerfile/env',
'image/dockerfile/arg',
'image/dockerfile/volume',
'image/dockerfile/expose',
'image/dockerfile/workdir',
'image/dockerfile/user',
'image/dockerfile/healthcheck',
'image/dockerfile/label',
'image/dockerfile/shell',
'image/dockerfile/onbuild',
'image/dockerfile/references',
'image/multistage-builds/',
'image/multistage-builds/laravel',
'image/manifest',
]
}, {
title: "操作容器",
collapsable: false,
children: [
'container/',
'container/run',
'container/daemon',
'container/stop',
'container/attach_exec',
'container/import_export',
'container/rm',
],
},
{
title: "Docker 仓库",
collapsable: false,
children: [
'repository/',
'repository/dockerhub',
'repository/registry',
'repository/registry_auth',
'repository/nexus3_registry',
],
},
{
title: "数据管理",
collapsable: false,
children: [
'data_management/',
'data_management/volume',
'data_management/bind-mounts',
],
}, {
title: "使用网络",
collapsable: false,
children: [
'network/',
'network/port_mapping',
'network/linking',
'network/dns',
],
},
{
title: "高级网络配置",
collapsable: true,
children: [
'advanced_network/',
'advanced_network/quick_guide',
'advanced_network/access_control',
'advanced_network/port_mapping',
'advanced_network/bridge',
'advanced_network/example',
'advanced_network/config_file',
'advanced_network/ptp',
],
},
{
title: "Swarm mode",
collapsable: true,
children: [
'swarm_mode/',
'swarm_mode/overview',
'swarm_mode/create',
'swarm_mode/deploy',
'swarm_mode/stack',
'swarm_mode/secret',
'swarm_mode/config',
'swarm_mode/rolling_update',
],
},
{
title: "安全",
collapsable: true,
children: [
'security/',
'security/kernel_ns',
'security/control_group',
'security/daemon_sec',
'security/kernel_capability',
'security/other_feature',
'security/summary',
],
},
{
title: "底层实现",
collapsable: true,
children: [
'underly/',
'underly/arch',
'underly/namespace',
'underly/cgroups',
'underly/ufs',
'underly/container_format',
'underly/network',
],
},
{
title: "Docker Buildx",
collapsable: false,
children: [
"buildx/",
"buildx/buildkit",
"buildx/buildx",
"buildx/multi-arch-images",
],
},
{
title: "Etcd",
collapsable: true,
children: [
'etcd/',
'etcd/intro',
'etcd/install',
'etcd/cluster',
'etcd/etcdctl',
],
},
{
title: "Fedora CoreOS",
collapsable: true,
children: [
'coreos/',
'coreos/intro',
'coreos/install',
],
},
'podman/',
'appendix/faq/',
{
title: "热门镜像介绍",
collapsable: true,
children: [
'appendix/repo/',
'appendix/repo/ubuntu',
'appendix/repo/centos',
'appendix/repo/nginx',
'appendix/repo/php',
'appendix/repo/nodejs',
'appendix/repo/mysql',
'appendix/repo/wordpress',
'appendix/repo/mongodb',
'appendix/repo/redis',
'appendix/repo/minio',
],
},
{
title: "Docker 命令",
collapsable: true,
children: [
'appendix/command/',
'appendix/command/docker',
'appendix/command/dockerd',
]
},
'appendix/best_practices',
'appendix/debug',
'appendix/resources',
],
},
}
});

129
CHANGELOG.md Normal file
View File

@ -0,0 +1,129 @@
# 修订记录
* 1.3.0 2021-YY-DD
* 全面支持 Docker v20.10 新版本
* 新增 Docker Compose v2
* Docker Hub 自动构建转为付费功能
* 1.2.0 2020-12-20
* 错误修复
* 1.1.0 2019-12-31
* 全面支持 Docker v19.03 新版本
* 增加 `BuildKit`
* 增加 `docker buildx` 命令使用说明
* 增加 `docker manifest` 命令使用说明
* 移除 `Ubuntu 14.04` `Debian 8` `Debian 7`
* 1.0.0: 2018-12-31
* 全面支持 Docker v18.x 新版本
* 添加如何调试 Docker
* 错误修正
* 0.9.0: 2017-12-31
* v1.13.x 旧版本的最后支持
* 0.9.0-rc2: 2017-12-10
* 增加 Docker 中文资源链接
* 增加介绍基于 Docker CI/CD 工具 `Drone`
* 增加 `docker secret` 相关内容
* 增加 `docker config` 相关内容
* 增加 `LinuxKit` 相关内容
* 更新 `CoreOS` 章节
* 更新 `etcd` 章节基于 3.x 版本
* 删除 `Docker Compose` 中的 `links`指令
* 替换 `docker daemon` 命令为 `dockerd`
* 替换 `docker ps` 命令为 `docker container ls`
* 替换 `docker images` 命令为 `docker image ls`
* 修改 `安装 Docker` 一节中部分文字表述
* 移除历史遗留文件和错误的文件
* 优化文字排版
* 调整目录结构
* 修复内容逻辑错误
* 修复`404` 链接
* 0.9.0-rc1: 2017-11-29
* 根据最新版本v17.09修订内容
* 增加 `Dockerfile` 多阶段构建( `multistage builds` ) `Docker 17.05` 新增特性
* 增加 `docker exec` 子命令介绍
* 增加 `docker` 管理子命令 `container` `image` `network` `volume` 介绍
* 增加 `树莓派单片电脑` 安装 Docker
* 增加 Docker 存储驱动 `OverlayFS` 相关内容
* 更新 `Docker CE` `v17.x` 安装说明
* 更新 `Docker 网络` 一节
* 更新 `Docker Machine` 基于 0.13.0 版本
* 更新 `Docker Compose` 基于 3 文件格式
* 删除 `Docker Swarm` 相关内容替换为 `Swarm mode` `Docker 1.12.0` 新增特性
* 删除 `docker run` `--link` 参数
* 精简 `Docker Registry` 一节
* 替换 `docker run` `-v` 参数为 `--mount`
* 修复 `404` 链接
* 优化文字排版
* 增加离线阅读功能
* 0.8.0: 2017-01-08
* 修正文字内容
* 根据最新版本1.12修订安装使用
* 补充附录章节
* 0.7.0: 2016-06-12
* 根据最新版本进行命令调整
* 修正若干文字描述
* 0.6.0: 2015-12-24
* 补充 Machine 项目
* 修正若干 bug
* 0.5.0: 2015-06-29
* 添加 Compose 项目
* 添加 Machine 项目
* 添加 Swarm 项目
* 完善 Kubernetes 项目内容
* 添加 Mesos 项目内容
* 0.4.0: 2015-05-08
* 添加 Etcd 项目
* 添加 Fig 项目
* 添加 CoreOS 项目
* 添加 Kubernetes 项目
* 0.3.0: 2014-11-25
* 完成仓库章节
* 重写安全章节
* 修正底层实现章节的架构命名空间控制组文件系统容器格式等内容
* 添加对常见仓库和镜像的介绍
* 添加 Dockerfile 的介绍
* 重新校订中英文混排格式
* 修订文字表达
* 发布繁体版本分支zh-Hant
* 0.2.0: 2014-09-18
* 对照官方文档重写介绍基本概念安装镜像容器仓库数据管理网络等章节
* 添加底层实现章节
* 添加命令查询和资源链接章节
* 其它修正
* 0.1.0: 2014-09-05
* 添加基本内容
* 修正错别字和表达不通顺的地方

41
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,41 @@
# 如何贡献
领取或创建新的 [Issue](https://github.com/yeasy/docker_practice/issues),如 [issue 235](https://github.com/yeasy/docker_practice/issues/235),添加自己为 `Assignee`。
[GitHub](https://github.com/yeasy/docker_practice/fork) 上 `fork` 到自己的仓库,如 `docker_user/docker_practice`,然后 `clone` 到本地,并设置用户信息。
```bash
$ git clone git@github.com:docker_user/docker_practice.git
$ cd docker_practice
```
修改代码后提交并推送到自己的仓库注意修改提交消息为对应 Issue 号和描述
```bash
# Update the content
$ git commit -a -s
# In commit msg dialog, add content like "Fix issue #235: describe ur change"
$ git push
```
[GitHub](https://github.com/yeasy/docker_practice/pulls) 上提交 `Pull Request`,添加标签,并邀请维护者进行 `Review`。
定期使用项目仓库内容更新自己仓库内容
```bash
$ git remote add upstream https://github.com/yeasy/docker_practice
$ git fetch upstream
$ git rebase upstream/master
$ git push -f origin master
```
## 排版规范
本开源书籍遵循 [中文排版指南](https://github.com/mzlogin/chinese-copywriting-guidelines) 规范。

136
README.md
View File

@ -1,89 +1,73 @@
# Docker 从入门到实践
0.7.0
# Docker 从入门到实践
[Docker](http://www.docker.com) 是个很有意思的开源项目,它彻底释放了虚拟化的威力,极大提高了应用的运行效率,降低了云计算资源供应的成本,同时让应用的部署、测试和分发都变得前所未有的高效和轻松!
[![](https://img.shields.io/github/stars/yeasy/docker_practice.svg?style=social&label=Stars)](https://github.com/yeasy/docker_practice) [![](https://img.shields.io/github/release/yeasy/docker_practice/all.svg)](https://github.com/yeasy/docker_practice/releases) [![](https://img.shields.io/badge/Based-Docker%20CE%20v20.10-blue.svg)](https://github.com/docker/docker-ce) [![](https://img.shields.io/badge/Docker%20%E6%8A%80%E6%9C%AF%E5%85%A5%E9%97%A8%E4%B8%8E%E5%AE%9E%E6%88%98-jd.com-red.svg)][1]
无论是应用开发者运维人员还是云计算从业人员都有必要认识和掌握 Docker以在有限的时间内做更多有意义的事
**v1.3.0**
本书既适用于具备基础 Linux 知识的 Docker 初学者也希望可供理解原理和实现的高级用户参考同时书中给出的实践案例可供在进行实际部署时借鉴前六章为基础内容供用户理解 Docker 的基本概念和操作7 ~ 9 章介绍一些高级操作 10 章给出典型的应用场景和实践案例11 ~ 13 章介绍关于 Docker 实现的相关细节技术后续章节则分别介绍一些相关的热门开源项目
| 语言 | - |
| :------------- | :--- |
| [简体中文](https://github.com/yeasy/docker_practice) | [阅读](https://vuepress.mirror.docker-practice.com/) |
在线阅读[GitBook](https://www.gitbook.io/book/yeasy/docker_practice) 或 [Github](https://github.com/yeasy/docker_practice/blob/master/SUMMARY.md)。
[Docker](https://www.docker.com) 是个划时代的开源项目,它彻底释放了计算虚拟化的威力,极大提高了应用的维护效率,降低了云计算应用开发的成本!使用 Docker可以让应用的部署、测试和分发都变得前所未有的高效和轻松
欢迎关注 DockerPool 社区微博 [@dockerpool](http://weibo.com/u/5345404432),或加入 Docker 技术交流 QQ 群或微信组,分享 Docker 资源,交流 Docker 技术
无论是应用开发者运维人员还是其他信息技术从业人员都有必要认识和掌握 Docker节约有限的生命
* QQ I 已满341410255
* QQ II 已满419042067
* QQ III已满210028779
* QQ IV 可加483702734
本书既适用于具备基础 Linux 知识的 Docker 初学者也希望可供理解原理和实现的高级用户参考同时书中给出的实践案例可供在进行实际部署时借鉴前六章为基础内容供用户理解 Docker 的基本概念和操作7 ~ 9 章介绍包括数据管理网络等高级操作 10 ~ 12 章介绍了容器生态中的几个核心项目1314 章讨论了关于 Docker 安全和实现技术等高级话题后续章节则分别介绍包括 EtcdFedora CoreOSKubernetes容器云等相关热门开源项目最后还展示了使用容器技术的典型的应用场景和实践案例
![Docker 技术入门与实战](docker_primer.png)
* 在线阅读[docker-practice.com](https://vuepress.mirror.docker-practice.com/)[GitBook](https://yeasy.gitbook.io/docker_practice/)[Github](https://github.com/yeasy/docker_practice/blob/master/SUMMARY.md)
* 离线阅读[`$ docker run -it --rm -p 4000:80 ccr.ccs.tencentyun.com/dockerpracticesig/docker_practice:vuepress`](https://github.com/yeasy/docker_practice/wiki/%E7%A6%BB%E7%BA%BF%E9%98%85%E8%AF%BB%E5%8A%9F%E8%83%BD%E8%AF%A6%E8%A7%A3)
[Docker 技术入门与实战](http://item.jd.com/11598400.html)》一书已经正式出版,包含大量第一手实战案例和更为深入的技术剖析,欢迎大家阅读使用并帮忙反馈建议
Docker 自身仍在快速发展中生态环境也在蓬勃成长建议初学者使用最新稳定版本的 Docker 进行学习实践欢迎 [参与项目维护](CONTRIBUTING.md)
* [China-Pub](http://product.china-pub.com/3770833)
* [京东图书](http://item.jd.com/11598400.html)
* [当当图书](http://product.dangdang.com/23620853.html)
* [亚马逊图书](http://www.amazon.cn/%E5%9B%BE%E4%B9%A6/dp/B00R5MYI7C/ref=lh_ni_t?ie=UTF8&psc=1&smid=A1AJ19PSB66TGU)
* [修订记录](CHANGELOG.md)
* [贡献者名单](https://github.com/yeasy/docker_practice/graphs/contributors)
## 主要版本历史
* 0.7.0: 2016-06-12
* 根据最新版本进行命令调整
* 修正若干文字描述
* 0.6.0: 2015-12-24
* 补充 Machine 项目
* 修正若干 bug
* 0.5.0: 2015-06-29
* 添加 Compose 项目
* 添加 Machine 项目
* 添加 Swarm 项目
* 完善 Kubernetes 项目内容
* 添加 Mesos 项目内容
* 0.4.0: 2015-05-08
* 添加 Etcd 项目
* 添加 Fig 项目
* 添加 CoreOS 项目
* 添加 Kubernetes 项目
* 0.3.0: 2014-11-25
* 完成仓库章节
* 重写安全章节
* 修正底层实现章节的架构名字空间控制组文件系统容器格式等内容
* 添加对常见仓库和镜像的介绍
* 添加 Dockerfile 的介绍
* 重新校订中英文混排格式
* 修订文字表达
* 发布繁体版本分支zh-Hant
* 0.2.0: 2014-09-18
* 对照官方文档重写介绍基本概念安装镜像容器仓库数据管理网络等章节
* 添加底层实现章节
* 添加命令查询和资源链接章节
* 其它修正
* 0.1.0: 2014-09-05
* 添加基本内容;
* 修正错别字和表达不通顺的地方
## 微信小程序
<p align="center">
<img width="200" src="https://docker_practice.gitee.io/pic/dp-wechat-miniprogram.jpg">
</p>
Docker 自身仍在快速发展中生态环境也在蓬勃成长源码开源托管在 Github 欢迎参与维护[https://github.com/yeasy/docker_practice](https://github.com/yeasy/docker_practice)。贡献者 [名单](https://github.com/yeasy/docker_practice/graphs/contributors)。
<p align="center"><strong>微信扫码 随时随地阅读~</strong></p>
## 参加步骤
* GitHub `fork` 到自己的仓库 `docker_user/docker_practice`然后 `clone` 到本地并设置用户信息
```
$ git clone git@github.com:docker_user/docker_practice.git
$ cd docker_practice
$ git config user.name "yourname"
$ git config user.email "your email"
```
* 修改代码后提交并推送到自己的仓库
```
$ #do some change on the content
$ git commit -am "Fix issue #1: change helo to hello"
$ git push
```
* GitHub 网站上提交 pull request
* 定期使用项目仓库内容更新自己仓库内容
```
$ git remote add upstream https://github.com/yeasy/docker_practice
$ git fetch upstream
$ git checkout master
$ git rebase upstream/master
$ git push -f origin master
```
## 技术交流
<p align="center">
<img width="200" src="https://docker_practice.gitee.io/pic/dpsig-wechat.jpg">
</p>
<p align="center"><strong>微信扫码 加入群聊~ 或者微信添加 <code>dpsigs</code> 邀请入群</strong></p>
欢迎加入 Docker 技术交流 QQ 分享 Docker 资源交流 Docker 技术
* QQ I 已满341410255
* QQ II 已满419042067
* QQ III 已满210028779
* QQ IV 已满483702734
* QQ V 已满460598761
* QQ VI 已满581983671
* QQ VII 已满252403484
* QQ VIII已满544818750
* QQ IX 已满571502246
* QQ X 可加145983035
>如果有容器技术相关的疑问请通过 [Issues](https://github.com/yeasy/docker_practice/issues/new/choose) 来提出。
## 进阶学习
[![](https://github.com/yeasy/docker_practice/raw/master/_images/docker_primer3.png)][1]
[Docker 技术入门与实战][1]第三版已经面世介绍最新的容器技术栈欢迎大家阅读使用并反馈建议
* [京东图书][1]
* [China-Pub](http://product.china-pub.com/8052127)
## 鼓励项目
<p align="center">
<img width="200" src="https://github.com/yeasy/docker_practice/raw/master/_images/donate.jpeg">
</p>
<p align="center"><strong>欢迎鼓励项目一杯 coffee~</strong></p>
[1]: https://union-click.jd.com/jdc?e=&p=JF8AANADIgZlGF0VAxUDVBJdHDISBFAfWRcCGzcRRANLXSJeEF4aVwkMGQ1eD0kdSVJKSQVJHBIEUB9ZFwIbGAxeB0gyS34PbFlHVHNkI0MQEAoIcSxyBWFLRAtZK1olABYHXR9eHAoQN2UbXCVQfN_jrYOwsw7T_5SOnZUiBmUbXBYBFwBVG14UBBAAZRxbHDJJUjscCEEHEQ4FSA4VBhBQZStrFjIiN1UrWCVAfARQT1gQA0cFAEwOEAcRDlMTDEALQAFTEwwRUhMAUR1cJQATBlES

View File

@ -1,129 +1,172 @@
# Summary
# [Docker 从入门到实践](https://github.com/yeasy/docker_practice/blob/master/SUMMARY.md)
* [前言](README.md)
* [修订记录](CHANGELOG.md)
* [如何贡献](CONTRIBUTING.md)
* [Docker 简介](introduction/README.md)
* [什么是 Docker](introduction/what.md)
* [为什么要用 Docker](introduction/why.md)
* [什么是 Docker](introduction/what.md)
* [为什么要用 Docker](introduction/why.md)
* [基本概念](basic_concept/README.md)
* [镜像](basic_concept/image.md)
* [容器](basic_concept/container.md)
* [仓库](basic_concept/repository.md)
* [安装](install/README.md)
* [Ubuntu](install/ubuntu.md)
* [CentOS](install/centos.md)
* [Debian](install/debian.md)
* [镜像](image/README.md)
* [获取镜像](image/pull.md)
* [列出](image/list.md)
* [创建](image/create.md)
* [存出和载入](image/save_load.md)
* [移除](image/rmi.md)
* [实现原理](image/internal.md)
* [容器](container/README.md)
* [启动](container/run.md)
* [守护态运行](container/daemon.md)
* [终止](container/stop.md)
* [进入容器](container/enter.md)
* [导出和导入](container/import_export.md)
* [删除](container/rm.md)
* [仓库](repository/README.md)
* [Docker Hub](repository/dockerhub.md)
* [私有仓库](repository/local_repo.md)
* [配置文件](repository/config.md)
* [镜像](basic_concept/image.md)
* [容器](basic_concept/container.md)
* [仓库](basic_concept/repository.md)
* [安装 Docker](install/README.md)
* [Ubuntu](install/ubuntu.md)
* [Debian](install/debian.md)
* [Fedora](install/fedora.md)
* [CentOS](install/centos.md)
* [Raspberry Pi](install/raspberry-pi.md)
* [Linux 离线安装](install/offline.md)
* [macOS](install/mac.md)
* [Windows 10](install/windows.md)
* [镜像加速器](install/mirror.md)
* [开启实验特性](install/experimental.md)
* [使用镜像](image/README.md)
* [获取镜像](image/pull.md)
* [列出镜像](image/list.md)
* [删除本地镜像](image/rm.md)
* [利用 commit 理解镜像构成](image/commit.md)
* [使用 Dockerfile 定制镜像](image/build.md)
* [Dockerfile 指令详解](image/dockerfile/README.md)
* [COPY 复制文件](image/dockerfile/copy.md)
* [ADD 更高级的复制文件](image/dockerfile/add.md)
* [CMD 容器启动命令](image/dockerfile/cmd.md)
* [ENTRYPOINT 入口点](image/dockerfile/entrypoint.md)
* [ENV 设置环境变量](image/dockerfile/env.md)
* [ARG 构建参数](image/dockerfile/arg.md)
* [VOLUME 定义匿名卷](image/dockerfile/volume.md)
* [EXPOSE 暴露端口](image/dockerfile/expose.md)
* [WORKDIR 指定工作目录](image/dockerfile/workdir.md)
* [USER 指定当前用户](image/dockerfile/user.md)
* [HEALTHCHECK 健康检查](image/dockerfile/healthcheck.md)
* [ONBUILD 为他人作嫁衣裳](image/dockerfile/onbuild.md)
* [LABEL 为镜像添加元数据](image/dockerfile/label.md)
* [SHELL 指令](image/dockerfile/shell.md)
* [参考文档](image/dockerfile/references.md)
* [Dockerfile 多阶段构建](image/multistage-builds/README.md)
* [实战多阶段构建 Laravel 镜像](image/multistage-builds/laravel.md)
* [构建多种系统架构支持的 Docker 镜像](image/manifest.md)
* [其它制作镜像的方式](image/other.md)
* [实现原理](image/internal.md)
* [操作容器](container/README.md)
* [启动](container/run.md)
* [守护态运行](container/daemon.md)
* [终止](container/stop.md)
* [进入容器](container/attach_exec.md)
* [导出和导入](container/import_export.md)
* [删除](container/rm.md)
* [访问仓库](repository/README.md)
* [Docker Hub](repository/dockerhub.md)
* [私有仓库](repository/registry.md)
* [私有仓库高级配置](repository/registry_auth.md)
* [Nexus 3](repository/nexus3_registry.md)
* [数据管理](data_management/README.md)
* [数据卷](data_management/volume.md)
* [数据卷容器](data_management/container.md)
* [备份恢复迁移数据卷](data_management/management.md)
* [数据卷](data_management/volume.md)
* [挂载主机目录](data_management/bind-mounts.md)
* [使用网络](network/README.md)
* [外部访问容器](network/port_mapping.md)
* [容器互联](network/linking.md)
* [外部访问容器](network/port_mapping.md)
* [容器互联](network/linking.md)
* [配置 DNS](network/dns.md)
* [高级网络配置](advanced_network/README.md)
* [快速配置指南](advanced_network/quick_guide.md)
* [配置 DNS](advanced_network/dns.md)
* [容器访问控制](advanced_network/access_control.md)
* [端口映射实现](advanced_network/port_mapping.md)
* [配置 docker0 网桥](advanced_network/docker0.md)
* [自定义网桥](advanced_network/bridge.md)
* [工具和示例](advanced_network/example.md)
* [编辑网络配置文件](advanced_network/config_file.md)
* [实例创建一个点到点连接](advanced_network/ptp.md)
* [实战案例](cases/README.md)
* [使用 Supervisor 来管理进程](cases/supervisor.md)
* [创建 tomcat/weblogic 集群](cases/tomcat.md)
* [多台物理主机之间的容器互联](cases/container_connect.md)
* [标准化开发测试和生产环境](cases/environment.md)
* [快速配置指南](advanced_network/quick_guide.md)
* [容器访问控制](advanced_network/access_control.md)
* [端口映射实现](advanced_network/port_mapping.md)
* [配置 docker0 网桥](advanced_network/docker0.md)
* [自定义网桥](advanced_network/bridge.md)
* [工具和示例](advanced_network/example.md)
* [编辑网络配置文件](advanced_network/config_file.md)
* [配置 HTTP/HTTPS 网络代理](advanced_network/http_https_proxy.md)
* [实例创建一个点到点连接](advanced_network/ptp.md)
* [Docker Buildx](buildx/README.md)
* [BuildKit](buildx/buildkit.md)
* [使用 buildx 构建镜像](buildx/buildx.md)
* [使用 buildx 构建多种系统架构支持的 Docker 镜像](buildx/multi-arch-images.md)
* [Docker Compose](compose/README.md)
* [简介](compose/introduction.md)
* [Compose v2](compose/v2.md)
* [安装与卸载](compose/install.md)
* [使用](compose/usage.md)
* [命令说明](compose/commands.md)
* [Compose 模板文件](compose/compose_file.md)
* [实战 Django](compose/django.md)
* [实战 Rails](compose/rails.md)
* [实战 WordPress](compose/wordpress.md)
* [实战 LNMP](compose/lnmp.md)
* [Swarm mode](swarm_mode/README.md)
* [基本概念](swarm_mode/overview.md)
* [创建 Swarm 集群](swarm_mode/create.md)
* [部署服务](swarm_mode/deploy.md)
* [使用 compose 文件](swarm_mode/stack.md)
* [管理密钥](swarm_mode/secret.md)
* [管理配置信息](swarm_mode/config.md)
* [滚动升级](swarm_mode/rolling_update.md)
* [安全](security/README.md)
* [内核名字空间](security/kernel_ns.md)
* [控制组](security/control_group.md)
* [服务端防护](security/daemon_sec.md)
* [内核能力机制](security/kernel_capability.md)
* [其它安全特性](security/other_feature.md)
* [总结](security/summary.md)
* [Dockerfile](dockerfile/README.md)
* [基本结构](dockerfile/basic_structure.md)
* [指令](dockerfile/instructions.md)
* [创建镜像](dockerfile/build_image.md)
* [内核命名空间](security/kernel_ns.md)
* [控制组](security/control_group.md)
* [服务端防护](security/daemon_sec.md)
* [内核能力机制](security/kernel_capability.md)
* [其它安全特性](security/other_feature.md)
* [总结](security/summary.md)
* [底层实现](underly/README.md)
* [基本架构](underly/arch.md)
* [名字空间](underly/namespace.md)
* [控制组](underly/cgroups.md)
* [联合文件系统](underly/ufs.md)
* [容器格式](underly/container_format.md)
* [网络](underly/network.md)
* [Docker Compose 项目](compose/README.md)
* [简介](compose/intro.md)
* [安装](compose/install.md)
* [使用](compose/usage.md)
* [命令说明](compose/commands.md)
* [YAML 模板文件](compose/yaml_file.md)
* [Docker Machine 项目](machine/README.md)
* [简介](machine/intro.md)
* [安装](machine/install.md)
* [使用](machine/usage.md)
* [Docker Swarm 项目](swarm/README.md)
* [简介](swarm/intro.md)
* [安装](swarm/install.md)
* [使用](swarm/usage.md)
* [调度器](swarm/scheduling.md)
* [过滤器](swarm/filter.md)
* [基本架构](underly/arch.md)
* [命名空间](underly/namespace.md)
* [控制组](underly/cgroups.md)
* [联合文件系统](underly/ufs.md)
* [容器格式](underly/container_format.md)
* [网络](underly/network.md)
* [Etcd 项目](etcd/README.md)
* [简介](etcd/intro.md)
* [安装](etcd/install.md)
* [使用 etcdctl](etcd/etcdctl.md)
* [Fig 项目](fig/README.md)
* [简介](fig/intro.md)
* [安装](fig/install.md)
* [命令参考](fig/cli_ref.md)
* [fig.yml参考](fig/yml_ref.md)
* [环境变量参考](fig/env_ref.md)
* [实战 Django](fig/django.md)
* [实战 Rails](fig/rails.md)
* [实战 wordpress](fig/wordpress.md)
* [CoreOS 项目](coreos/README.md)
* [简介](coreos/intro.md)
* [工具](coreos/intro_tools.md)
* [快速搭建CoreOS集群](coreos/quickstart.md)
* [Kubernetes 项目](kubernetes/README.md)
* [简介](kubernetes/intro.md)
* [快速上手](kubernetes/quickstart.md)
* [基本概念](kubernetes/concepts.md)
* [kubectl 使用](kubernetes/kubectl.md)
* [架构设计](kubernetes/design.md)
* [Mesos 项目](mesos/README.md)
* [简介](mesos/intro.md)
* [安装与使用](mesos/installation.md)
* [原理与架构](mesos/architecture.md)
* [配置项解析](mesos/configuration.md)
* [常见框架](mesos/framework.md)
* [附录一命令查询](appendix_command/README.md)
* [附录二常见仓库介绍](appendix_repo/README.md)
* [Ubuntu](appendix_repo/ubuntu.md)
* [CentOS](appendix_repo/centos.md)
* [MySQL](appendix_repo/mysql.md)
* [MongoDB](appendix_repo/mongodb.md)
* [Redis](appendix_repo/redis.md)
* [Nginx](appendix_repo/nginx.md)
* [WordPress](appendix_repo/wordpress.md)
* [Node.js](appendix_repo/nodejs.md)
* [附录三有用的资源](appendix_resources/README.md)
* [简介](etcd/intro.md)
* [安装](etcd/install.md)
* [集群](etcd/cluster.md)
* [使用 etcdctl](etcd/etcdctl.md)
* [Fedora CoreOS](coreos/README.md)
* [简介](coreos/intro.md)
* [安装](coreos/install.md)
* [Kubernetes - 开源容器编排引擎](kubernetes/README.md)
* [简介](kubernetes/intro.md)
* [基本概念](kubernetes/concepts.md)
* [架构设计](kubernetes/design.md)
* [部署 Kubernetes](kubernetes/setup/README.md)
* [使用 kubeadm 部署 kubernetes(CRI 使用 containerd)](kubernetes/setup/kubeadm.md)
* [ Docker Desktop 使用](kubernetes/setup/docker-desktop.md)
* [一步步部署 kubernetes 集群](kubernetes/setup/systemd.md)
* [部署 Dashboard](kubernetes/setup/dashboard.md)
* [Kubernetes 命令行 kubectl](kubernetes/kubectl/README.md)
* [容器与云计算](cloud/README.md)
* [简介](cloud/intro.md)
* [腾讯云](cloud/tencentCloud.md)
* [阿里云](cloud/alicloud.md)
* [亚马逊云](cloud/aws.md)
* [小结](cloud/summary.md)
* [实战案例 - 操作系统](cases/os/README.md)
* [Busybox](cases/os/busybox.md)
* [Alpine](cases/os/alpine.md)
* [Debian Ubuntu](cases/os/debian.md)
* [CentOS Fedora](cases/os/centos.md)
* [本章小结](cases/os/summary.md)
* [实战案例 - CI/CD](cases/ci/README.md)
* [GitHub Actions](cases/ci/actions/README.md)
* [Drone](cases/ci/drone/README.md)
* [部署 Drone](cases/ci/drone/install.md)
* [ IDE 中使用 Docker](ide/README.md)
* [VS Code](ide/vsCode.md)
* [podman - 下一代 Linux 容器工具](podman/README.md)
* [附录](appendix/README.md)
* [附录一常见问题总结](appendix/faq/README.md)
* [附录二热门镜像介绍](appendix/repo/README.md)
* [Ubuntu](appendix/repo/ubuntu.md)
* [CentOS](appendix/repo/centos.md)
* [Nginx](appendix/repo/nginx.md)
* [PHP](appendix/repo/php.md)
* [Node.js](appendix/repo/nodejs.md)
* [MySQL](appendix/repo/mysql.md)
* [WordPress](appendix/repo/wordpress.md)
* [MongoDB](appendix/repo/mongodb.md)
* [Redis](appendix/repo/redis.md)
* [Minio](appendix/repo/minio.md)
* [附录三Docker 命令查询](appendix/command/README.md)
* [客户端命令 - docker](appendix/command/docker.md)
* [服务端命令 - dockerd](appendix/command/dockerd.md)
* [附录四Dockerfile 最佳实践](appendix/best_practices.md)
* [附录五如何调试 Docker](appendix/debug.md)
* [附录六资源链接](appendix/resources.md)

2
_config.yml Normal file
View File

@ -0,0 +1,2 @@
theme: jekyll-theme-slate
include: [_images]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

BIN
_images/cover.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

BIN
_images/cover.sketch Normal file

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

BIN
_images/docker_primer2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

BIN
_images/docker_primer3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
_images/donate.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

View File

@ -1,49 +0,0 @@
# Some useful commands to use docker.
# Author: yeasy@github
# Created:2014-09-25
alias docker-pid="sudo docker inspect --format '{{.State.Pid}}'"
alias docker-ip="sudo docker inspect --format '{{ .NetworkSettings.IPAddress }}'"
#the implementation refs from https://github.com/jpetazzo/nsenter/blob/master/docker-enter
function docker-enter() {
#if [ -e $(dirname "$0")/nsenter ]; then
#Change for centos bash running
if [ -e $(dirname '$0')/nsenter ]; then
# with boot2docker, nsenter is not in the PATH but it is in the same folder
NSENTER=$(dirname "$0")/nsenter
else
# if nsenter has already been installed with path notified, here will be clarified
NSENTER=$(which nsenter)
#NSENTER=nsenter
fi
[ -z "$NSENTER" ] && echo "WARN Cannot find nsenter" && return
if [ -z "$1" ]; then
echo "Usage: `basename "$0"` CONTAINER [COMMAND [ARG]...]"
echo ""
echo "Enters the Docker CONTAINER and executes the specified COMMAND."
echo "If COMMAND is not specified, runs an interactive shell in CONTAINER."
else
PID=$(sudo docker inspect --format "{{.State.Pid}}" "$1")
if [ -z "$PID" ]; then
echo "WARN Cannot find the given container"
return
fi
shift
OPTS="--target $PID --mount --uts --ipc --net --pid"
if [ -z "$1" ]; then
# No command given.
# Use su to clear all host environment variables except for TERM,
# initialize the environment variables HOME, SHELL, USER, LOGNAME, PATH,
# and start a login shell.
#sudo $NSENTER "$OPTS" su - root
sudo $NSENTER --target $PID --mount --uts --ipc --net --pid su - root
else
# Use env to clear all host environment variables.
sudo $NSENTER --target $PID --mount --uts --ipc --net --pid env -i $@
fi
fi
}

Binary file not shown.

View File

@ -1,13 +0,0 @@
#!/bin/sh
# This script will update all local images
# See: https://github.com/yeasy/docker_practice/blob/master/_local/pull_all.sh
# Usage: pull_all
# Author: yeasy@github
# Create: 2014-09-23
for image in `sudo docker images|grep -v "REPOSITORY"|grep -v "<none>"|awk '{print $1":"$2}'`
do
sudo docker pull $image
done

View File

@ -1,12 +0,0 @@
#!/bin/sh
# This script will upload all local images to a registry server ($registry is the default value).
# This script requires the push_images, which can be found at https://github.com/yeasy/docker_practice/blob/master/_local/push_images.sh
# Usage: push_all
# Author: yeasy@github
# Create: 2014-09-23
for image in `sudo docker images|grep -v "REPOSITORY"|grep -v "<none>"|awk '{print $1":"$2}'`
do
push_images $image
done

View File

@ -1,47 +0,0 @@
#!/bin/sh
# This script will upload the given local images to a registry server ($registry is the default value).
# See: https://github.com/yeasy/docker_practice/blob/master/_local/push_images.sh
# Usage: push_images image1 [image2...]
# Author: yeasy@github
# Create: 2014-09-23
#The registry server address where you want push the images into
registry=127.0.0.1:5000
### DO NOT MODIFY THE FOLLOWING PART, UNLESS YOU KNOW WHAT IT MEANS ###
echo_r () {
[ $# -ne 1 ] && return 0
echo -e "\033[31m$1\033[0m"
}
echo_g () {
[ $# -ne 1 ] && return 0
echo -e "\033[32m$1\033[0m"
}
echo_y () {
[ $# -ne 1 ] && return 0
echo -e "\033[33m$1\033[0m"
}
echo_b () {
[ $# -ne 1 ] && return 0
echo -e "\033[34m$1\033[0m"
}
usage() {
sudo docker images
echo "Usage: $0 registry1:tag1 [registry2:tag2...]"
}
[ $# -lt 1 ] && usage && exit
echo_b "The registry server is $registry"
for image in "$@"
do
echo_b "Uploading $image..."
sudo docker tag $image $registry/$image
sudo docker push $registry/$image
sudo docker rmi $registry/$image
echo_g "Done"
done

View File

@ -1,12 +1,15 @@
# 高级网络配置
>注意本章属于 `Docker` 高级配置如果您是初学者您可以暂时跳过本章节直接学习 [Docker Compose](../compose) 一节
本章将介绍 Docker 的一些高级网络配置和选项
Docker 启动时会自动在主机上创建一个 `docker0` 虚拟网桥实际上是 Linux 的一个 bridge可以理解为一个软件交换机它会在挂载到它的网口之间进行转发
同时Docker 随机分配一个本地未占用的私有网段 [RFC1918](http://tools.ietf.org/html/rfc1918) 中定义)中的一个地址给 `docker0` 接口。比如典型的 `172.17.42.1`,掩码为 `255.255.0.0`。此后启动的容器内的网口也会自动分配一个同一网段(`172.17.0.0/16`)的地址。
同时Docker 随机分配一个本地未占用的私有网段 [RFC1918](https://datatracker.ietf.org/doc/html/rfc1918) 中定义)中的一个地址给 `docker0` 接口。比如典型的 `172.17.42.1`,掩码为 `255.255.0.0`。此后启动的容器内的网口也会自动分配一个同一网段(`172.17.0.0/16`)的地址。
当创建一个 Docker 容器的时候同时会创建了一对 `veth pair` 接口当数据包发送到一个接口时另外一个接口也可以收到相同的数据包这对接口一端在容器内 `eth0`另一端在本地并被挂载到 `docker0` 网桥名称以 `veth` 开头例如 `vethAQI2QT`通过这种方式主机可以跟容器通信容器之间也可以相互通信Docker 就创建了在主机和所有容器之间一个虚拟共享网络
![Docker 网络](../_images/network.png)
![Docker 网络](./_images/network.png)
接下来的部分将介绍在一些场景中Docker 所有的网络定制配置以及通过 Linux 命令来调整补充甚至替换 Docker 默认的网络配置

View File

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -1,36 +1,37 @@
## 容器访问控制
# 容器访问控制
容器的访问控制主要通过 Linux 上的 `iptables` 防火墙来进行管理和实现`iptables` Linux 上默认的防火墙软件在大部分发行版中都自带
### 容器访问外部网络
## 容器访问外部网络
容器要想访问外部网络需要本地系统的转发支持在Linux 系统中检查转发是否打开
```
```bash
$sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1
```
如果为 0说明没有开启转发则需要手动打开
```
```bash
$sysctl -w net.ipv4.ip_forward=1
```
如果在启动 Docker 服务的时候设定 `--ip-forward=true`, Docker 就会自动设定系统的 `ip_forward` 参数为 1
### 容器之间访问
## 容器之间访问
容器之间相互访问需要两方面的支持
* 容器的网络拓扑是否已经互联默认情况下所有容器都会被连接到 `docker0` 网桥上
* 本地系统的防火墙软件 -- `iptables` 是否允许通过
#### 访问所有端口
当启动 Docker 服务时候默认会添加一条转发策略到 iptables FORWARD 链上策略为通过`ACCEPT`还是禁止`DROP`取决于配置`--icc=true`缺省值还是 `--icc=false`当然如果手动指定 `--iptables=false` 则不会添加 `iptables` 规则
### 访问所有端口
当启动 Docker 服务 dockerd时候默认会添加一条转发策略到本地主机 iptables FORWARD 链上策略为通过`ACCEPT`还是禁止`DROP`取决于配置`--icc=true`缺省值还是 `--icc=false`当然如果手动指定 `--iptables=false` 则不会添加 `iptables` 规则
可见默认情况下不同容器之间是允许网络互通的如果为了安全考虑可以在 `/etc/default/docker` 文件中配置 `DOCKER_OPTS=--icc=false` 来禁止它
可见默认情况下不同容器之间是允许网络互通的如果为了安全考虑可以在 `/etc/docker/daemon.json` 文件中配置 `{"icc": false}` 来禁止它
#### 访问指定端口
### 访问指定端口
在通过 `-icc=false` 关闭网络访问后还可以通过 `--link=CONTAINER_NAME:ALIAS` 选项来访问容器的开放端口
例如在启动 Docker 服务时可以同时使用 `icc=false --iptables=true` 参数来关闭允许相互的网络访问并让 Docker 可以修改系统中的 `iptables` 规则
此时系统中的 `iptables` 规则可能是类似
```
```bash
$ sudo iptables -nL
...
Chain FORWARD (policy ACCEPT)
@ -39,10 +40,10 @@ DROP all -- 0.0.0.0/0 0.0.0.0/0
...
```
之后启动容器`docker run`时使用 `--link=CONTAINER_NAME:ALIAS` 选项Docker 会在 `iptable` 中为 两个容器分别添加一条 `ACCEPT` 规则允许相互访问开放的端口取决于 Dockerfile 中的 EXPOSE
之后启动容器`docker run`时使用 `--link=CONTAINER_NAME:ALIAS` 选项Docker 会在 `iptable` 中为 两个容器分别添加一条 `ACCEPT` 规则允许相互访问开放的端口取决于 `Dockerfile` 中的 `EXPOSE` 指令
当添加了 `--link=CONTAINER_NAME:ALIAS` 选项后添加了 `iptables` 规则
```
```bash
$ sudo iptables -nL
...
Chain FORWARD (policy ACCEPT)

View File

@ -1,34 +1,45 @@
## 自定义网桥
# 自定义网桥
除了默认的 `docker0` 网桥用户也可以指定网桥来连接各个容器
在启动 Docker 服务的时候使用 `-b BRIDGE``--bridge=BRIDGE` 来指定使用的网桥
如果服务已经运行那需要先停止服务并删除旧的网桥
```
$ sudo service docker stop
```bash
$ sudo systemctl stop docker
$ sudo ip link set dev docker0 down
$ sudo brctl delbr docker0
```
然后创建一个网桥 `bridge0`
```
```bash
$ sudo brctl addbr bridge0
$ sudo ip addr add 192.168.5.1/24 dev bridge0
$ sudo ip link set dev bridge0 up
```
查看确认网桥创建并启动
```
```bash
$ ip addr show bridge0
4: bridge0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state UP group default
link/ether 66:38:d0:0d:76:18 brd ff:ff:ff:ff:ff:ff
inet 192.168.5.1/24 scope global bridge0
valid_lft forever preferred_lft forever
```
配置 Docker 服务默认桥接到创建的网桥上
```
$ echo 'DOCKER_OPTS="-b=bridge0"' >> /etc/default/docker
$ sudo service docker start
Docker 配置文件 `/etc/docker/daemon.json` 中添加如下内容即可将 Docker 默认桥接到创建的网桥上
```json
{
"bridge": "bridge0",
}
```
启动 Docker 服务
新建一个容器可以看到它已经桥接到了 `bridge0`
可以继续用 `brctl show` 命令查看桥接的信息另外在容器中可以使用 `ip addr` `ip route` 命令来查看 IP 地址配置和路由信息

View File

@ -1,5 +1,5 @@
## 编辑网络配置文件
# 编辑网络配置文件
Docker 1.2.0 开始支持在运行中的容器里编辑 `/etc/hosts`, `/etc/hostname` `/etc/resolve.conf` 文件
Docker 1.2.0 开始支持在运行中的容器里编辑 `/etc/hosts`, `/etc/hostname` `/etc/resolv.conf` 文件
但是这些修改是临时的只在运行的容器中保留容器终止或重启后并不会被保存下来也不会被 `docker commit` 提交
但是这些修改是临时的只在运行的容器中保留容器终止或重启后并不会被保存下来也不会被 `docker commit` 提交

View File

@ -1,29 +0,0 @@
## 配置 DNS
Docker 没有为每个容器专门定制镜像那么怎么自定义配置容器的主机名和 DNS 配置呢
秘诀就是它利用虚拟文件来挂载到来容器的 3 个相关配置文件
在容器中使用 mount 命令可以看到挂载信息
```
$ mount
...
/dev/disk/by-uuid/1fec...ebdf on /etc/hostname type ext4 ...
/dev/disk/by-uuid/1fec...ebdf on /etc/hosts type ext4 ...
tmpfs on /etc/resolv.conf type tmpfs ...
...
```
这种机制可以让宿主主机 DNS 信息发生更新后所有 Docker 容器的 dns 配置通过 `/etc/resolv.conf` 文件立刻得到更新
如果用户想要手动指定容器的配置可以利用下面的选项
`-h HOSTNAME or --hostname=HOSTNAME`
设定容器的主机名它会被写到容器内的 `/etc/hostname` `/etc/hosts`但它在容器外部看不到既不会在 `docker ps` 中显示也不会在其他的容器的 `/etc/hosts` 看到
`--link=CONTAINER_NAME:ALIAS`
选项会在创建容器的时候添加一个其他容器的主机名到 `/etc/hosts` 文件中让新容器的进程可以使用主机名 ALIAS 就可以连接它
`--dns=IP_ADDRESS`
添加 DNS 服务器到容器的 `/etc/resolv.conf` 让容器用这个服务器来解析所有不在 `/etc/hosts` 中的主机名
`--dns-search=DOMAIN`
设定容器的搜索域当设定搜索域为 `.example.com` 在搜索一个名为 host 的主机时DNS 不仅搜索host还会搜索 `host.example.com`
注意如果没有上述最后 2 个选项Docker 会默认用主机上的 `/etc/resolv.conf` 来配置容器

View File

@ -1,13 +1,17 @@
## 配置 docker0 网桥
# 配置 docker0 网桥
Docker 服务默认会创建一个 `docker0` 网桥其上有一个 `docker0` 内部接口它在内核层连通了其他的物理或虚拟网卡这就将所有容器和本地主机都放到同一个物理网络
Docker 默认指定了 `docker0` 接口 IP 地址和子网掩码让主机和容器之间可以通过网桥相互通信它还给出了 MTU接口允许接收的最大传输单元通常是 1500 Bytes或宿主主机网络路由上支持的默认值这些值都可以在服务启动的时候进行配置
* `--bip=CIDR` -- IP 地址加掩码格式例如 192.168.1.5/24
* `--mtu=BYTES` -- 覆盖默认的 Docker mtu 配置
* `--bip=CIDR` IP 地址加掩码格式例如 192.168.1.5/24
* `--mtu=BYTES` 覆盖默认的 Docker mtu 配置
也可以在配置文件中配置 DOCKER_OPTS然后重启服务
由于目前 Docker 网桥是 Linux 网桥用户可以使用 `brctl show` 来查看网桥和端口连接信息
```
```bash
$ sudo brctl show
bridge name bridge id STP enabled interfaces
docker0 8000.3a1d7362b4ee no veth65f9
@ -17,7 +21,8 @@ docker0 8000.3a1d7362b4ee no veth65f9
每次创建一个新容器的时候Docker 从可用的地址段中选择一个空闲的 IP 地址分配给容器的 eth0 端口使用本地主机上 `docker0` 接口的 IP 作为所有容器的默认网关
```
```bash
$ sudo docker run -i -t --rm base /bin/bash
$ ip addr show eth0
24: eth0: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
@ -29,5 +34,4 @@ $ ip addr show eth0
$ ip route
default via 172.17.42.1 dev eth0
172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.3
$ exit
```

View File

@ -1,8 +1,9 @@
## 工具和示例
# 工具和示例
在介绍自定义网络拓扑之前你可能会对一些外部工具和例子感兴趣
### pipework
## pipework
Jérôme Petazzoni 编写了一个叫 [pipework](https://github.com/jpetazzo/pipework) 的 shell 脚本,可以帮助用户在比较复杂的场景中完成容器的连接。
### playground
Brandon Rhodes 创建了一个提供完整的 Docker 容器网络拓扑管理的 [Python库](https://github.com/brandon-rhodes/fopnp/tree/m/playground)包括路由、NAT 防火墙;以及一些提供 HTTP, SMTP, POP, IMAP, Telnet, SSH, FTP 的服务器。
## playground
Brandon Rhodes 创建了一个提供完整的 Docker 容器网络拓扑管理的 [Python库](https://github.com/brandon-rhodes/fopnp/tree/m/playground)包括路由、NAT 防火墙;以及一些提供 `HTTP` `SMTP` `POP` `IMAP` `Telnet` `SSH` `FTP` 的服务器。

View File

@ -0,0 +1,74 @@
# 配置 HTTP/HTTPS 网络代理
使用Docker的过程中因为网络原因通常需要使用 HTTP/HTTPS 代理来加速镜像拉取构建和使用下面是常见的三种场景
## dockerd 设置网络代理
"docker pull" 命令是由 dockerd 守护进程执行 dockerd 守护进程是由 systemd 管理因此如果需要在执行 "docker pull" 命令时使用 HTTP/HTTPS 代理需要通过 systemd 配置
- dockerd 创建配置文件夹
```
sudo mkdir -p /etc/systemd/system/docker.service.d
```
- dockerd 创建 HTTP/HTTPS 网络代理的配置文件文件路径是 /etc/systemd/system/docker.service.d/http-proxy.conf 并在该文件中添加相关环境变量
```
[Service]
Environment="HTTP_PROXY=http://proxy.example.com:8080/"
Environment="HTTPS_PROXY=http://proxy.example.com:8080/"
Environment="NO_PROXY=localhost,127.0.0.1,.example.com"
```
- 刷新配置并重启 docker 服务
```
sudo systemctl daemon-reload
sudo systemctl restart docker
```
## docker 容器设置网络代理
在容器运行阶段如果需要使用 HTTP/HTTPS 代理可以通过更改 docker 客户端配置或者指定环境变量的方式
- 更改 docker 客户端配置创建或更改 ~/.docker/config.json并在该文件中添加相关配置
```
{
"proxies":
{
"default":
{
"httpProxy": "http://proxy.example.com:8080/",
"httpsProxy": "http://proxy.example.com:8080/",
"noProxy": "localhost,127.0.0.1,.example.com"
}
}
}
```
- 指定环境变量运行 "docker run" 命令时指定相关环境变量
| 环境变量 | docker run 示例 |
| -------- | ---------------- |
| HTTP_PROXY | --env HTTP_PROXY="http://proxy.example.com:8080/" |
| HTTPS_PROXY | --env HTTPS_PROXY="http://proxy.example.com:8080/" |
| NO_PROXY | --env NO_PROXY="localhost,127.0.0.1,.example.com" |
## docker build 过程设置网络代理
在容器构建阶段如果需要使用 HTTP/HTTPS 代理可以通过指定 "docker build" 的环境变量或者在 Dockerfile 中指定环境变量的方式
- 使用 "--build-arg" 指定 "docker build" 的相关环境变量
```
docker build \
--build-arg "HTTP_PROXY=http://proxy.example.com:8080/" \
--build-arg "HTTPS_PROXY=http://proxy.example.com:8080/" \
--build-arg "NO_PROXY=localhost,127.0.0.1,.example.com" .
```
- Dockerfile 中指定相关环境变量
| 环境变量 | Dockerfile 示例 |
| -------- | ---------------- |
| HTTP_PROXY | ENV HTTP_PROXY="http://proxy.example.com:8080/" |
| HTTPS_PROXY | ENV HTTPS_PROXY="http://proxy.example.com:8080/" |
| NO_PROXY | ENV NO_PROXY="localhost,127.0.0.1,.example.com" |

View File

@ -1,11 +1,14 @@
## 映射容器端口到宿主主机的实现
# 映射容器端口到宿主主机的实现
默认情况下容器可以主动访问到外部网络的连接但是外部网络无法访问到容器
### 容器访问外部实现
容器所有到外部网络的连接源地址都会被NAT成本地系统的IP地址这是使用 `iptables` 的源地址伪装操作实现的
## 容器访问外部实现
容器所有到外部网络的连接源地址都会被 NAT 成本地系统的 IP 地址这是使用 `iptables` 的源地址伪装操作实现的
查看主机的 NAT 规则
```
```bash
$ sudo iptables -t nat -nL
...
Chain POSTROUTING (policy ACCEPT)
@ -13,16 +16,18 @@ target prot opt source destination
MASQUERADE all -- 172.17.0.0/16 !172.17.0.0/16
...
```
其中上述规则将所有源地址在 `172.17.0.0/16` 网段目标地址为其他网段外部网络的流量动态伪装为从系统网卡发出MASQUERADE 跟传统 SNAT 的好处是它能动态从网卡获取地址
### 外部访问容器实现
## 外部访问容器实现
容器允许外部访问可以在 `docker run` 时候通过 `-p` `-P` 参数来启用
不管用那种办法其实也是在本地的 `iptable` nat 表中添加相应的规则
使用 `-P`
```
```bash
$ iptables -t nat -nL
...
Chain DOCKER (2 references)
@ -31,13 +36,22 @@ DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:49153 to:1
```
使用 `-p 80:80`
```
```bash
$ iptables -t nat -nL
Chain DOCKER (2 references)
target prot opt source destination
DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 to:172.17.0.2:80
```
注意
* 这里的规则映射了 0.0.0.0意味着将接受主机来自所有接口的流量用户可以通过 `-p IP:host_port:container_port` `-p
IP::port` 来指定允许访问容器的主机上的 IP接口等以制定更严格的规则
* 如果希望永久绑定到某个固定的 IP 地址可以在 Docker 配置文件 `/etc/default/docker` 中指定 `DOCKER_OPTS="--ip=IP_ADDRESS"`之后重启 Docker 服务即可生效
* 这里的规则映射了 `0.0.0.0`意味着将接受主机来自所有接口的流量用户可以通过 `-p IP:host_port:container_port` `-p IP::port` 来指定允许访问容器的主机上的 IP接口等以制定更严格的规则
* 如果希望永久绑定到某个固定的 IP 地址可以在 Docker 配置文件 `/etc/docker/daemon.json` 中添加如下内容
```json
{
"ip": "0.0.0.0"
}
```

View File

@ -1,4 +1,4 @@
## 示例创建一个点到点连接
# 示例创建一个点到点连接
默认情况下Docker 会将所有容器连接到由 `docker0` 提供的虚拟子网中
用户有时候需要两个容器之间可以直连通信而不用通过主机网桥进行桥接
@ -6,18 +6,18 @@
解决办法很简单创建一对 `peer` 接口分别放到两个容器中配置成点到点链路类型即可
首先启动 2 个容器
```
$ sudo docker run -i -t --rm --net=none base /bin/bash
```bash
$ docker run -i -t --rm --net=none base /bin/bash
root@1f1f4c1f931a:/#
$ sudo docker run -i -t --rm --net=none base /bin/bash
$ docker run -i -t --rm --net=none base /bin/bash
root@12e343489d2f:/#
```
找到进程号然后创建网络空间的跟踪文件
```
$ sudo docker inspect -f '{{.State.Pid}}' 1f1f4c1f931a
找到进程号然后创建网络名空间的跟踪文件
```bash
$ docker inspect -f '{{.State.Pid}}' 1f1f4c1f931a
2989
$ sudo docker inspect -f '{{.State.Pid}}' 12e343489d2f
$ docker inspect -f '{{.State.Pid}}' 12e343489d2f
3004
$ sudo mkdir -p /var/run/netns
$ sudo ln -s /proc/2989/ns/net /var/run/netns/2989
@ -25,7 +25,7 @@ $ sudo ln -s /proc/3004/ns/net /var/run/netns/3004
```
创建一对 `peer` 接口然后配置路由
```
```bash
$ sudo ip link add A type veth peer name B
$ sudo ip link set A netns 2989

View File

@ -1,23 +1,26 @@
## 快速配置指南
# 快速配置指南
下面是一个跟 Docker 网络相关的命令列表
其中有些命令选项只有在 Docker 服务启动的时候才能配置而且不能马上生效
* `-b BRIDGE or --bridge=BRIDGE` --指定容器挂载的网桥
* `--bip=CIDR` --定制 docker0 的掩码
* `-H SOCKET... or --host=SOCKET...` --Docker 服务端接收命令的通道
* `--icc=true|false` --是否支持容器之间进行通信
* `--ip-forward=true|false` --请看下文容器之间的通信
* `--iptables=true|false` --禁止 Docker 添加 iptables 规则
* `--mtu=BYTES` --容器网络中的 MTU
下面2个命令选项既可以在启动服务时指定也可以 Docker 容器启动`docker run`时候指定 Docker 服务启动的时候指定则会成为默认值后面执行 `docker run` 时可以覆盖设置的默认值
* `--dns=IP_ADDRESS...` --使用指定的DNS服务器
* `--dns-search=DOMAIN...` --指定DNS搜索域
* `-b BRIDGE` `--bridge=BRIDGE` 指定容器挂载的网桥
* `--bip=CIDR` 定制 docker0 的掩码
* `-H SOCKET...` `--host=SOCKET...` Docker 服务端接收命令的通道
* `--icc=true|false` 是否支持容器之间进行通信
* `--ip-forward=true|false` 请看下文容器之间的通信
* `--iptables=true|false` 是否允许 Docker 添加 iptables 规则
* `--mtu=BYTES` 容器网络中的 MTU
下面2个命令选项既可以在启动服务时指定也可以在启动容器时指定 Docker 服务启动的时候指定则会成为默认值后面执行 `docker run` 时可以覆盖设置的默认值
* `--dns=IP_ADDRESS...` 使用指定的DNS服务器
* `--dns-search=DOMAIN...` 指定DNS搜索域
最后这些选项只有在 `docker run` 执行时使用因为它是针对容器的特性内容
* `-h HOSTNAME or --hostname=HOSTNAME` --配置容器主机名
* `--link=CONTAINER_NAME:ALIAS` --添加到另一个容器的连接
* `--net=bridge|none|container:NAME_or_ID|host` --配置容器的桥接模式
* `-p SPEC or --publish=SPEC` --映射容器端口到宿主主机
* `-P or --publish-all=true|false` --映射容器所有端口到宿主主机
* `-h HOSTNAME` `--hostname=HOSTNAME` 配置容器主机名
* `--link=CONTAINER_NAME:ALIAS` 添加到另一个容器的连接
* `--net=bridge|none|container:NAME_or_ID|host` 配置容器的桥接模式
* `-p SPEC` `--publish=SPEC` 映射容器端口到宿主主机
* `-P or --publish-all=true|false` 映射容器所有端口到宿主主机

1
appendix/README.md Normal file
View File

@ -0,0 +1 @@
# 附录

View File

@ -1,56 +1,56 @@
//dot -Tpng xx.dot -o xx.png
digraph G {
rankdir=TB;
fontname = "Microsoft YaHei";
fontsize = 14;
penwidth = 3;
compound=true;
rankdir=LR;
node [shape = record];
edge [fontname = "Arial", fontsize = 12, color="darkgreen" ];
image[label="Image",color=blue];
registry[label="Registry",color=blue];
tar[label="Tar files",color=blue];
subgraph cluster_container {
label = "Container";
style = "bold";
color = blue;
edge [fontname = "Arial", fontsize = 11, color="skyblue" ];
//node [style=filled];
run[label="Running",shape=circle, style=filled, fillcolor=green];
stop[label="Stopped",shape=circle, style=filled, fillcolor=red];
pause[label="Paused",shape=circle, style=filled, fillcolor=blue];
run->pause[label="pause"];
pause->run[label="unpause"];
run->run[label="restart"];
run->stop[label="kill"];
stop->run[label="start"];
}
run->image[label="commit",ltail=cluster_container];
image->run[label="start"];
image->tar[label="export|save"];
tar->image[label="import"];
image->registry[label="push"];
registry->image[label="pull"];
//heat[label="heat commands",color=blue];
//heatshell[label="heatclient.shell.HeatShell",color=blue];
//shell[label="{heatclient.v1.shell|+do_stack_create\l+do_stack_show\l+do_stack_update\l...\l+do_event_list\l...\l+do_resource_list\l...\l+do_resource_type_show\l...\l+do_template_show\l...\l}",color=blue];
//heatclient[label="heatclient.client.Client",color=blue];
//client[label="heatclient.v1.client.Client",color=blue];
//httpclient[label="heatclient.common.http.HTTPClient",color=blue];
//openstackservices[label="{OpenStack Services|+Nova\l+Neutron\l+Keystone\l...}",color=blue];
//{rank=same; image cluster_container}
//{rank=same; rpcproxy apimixin}
}
//dot -Tpng xx.dot -o xx.png
digraph G {
rankdir=TB;
fontname = "Microsoft YaHei";
fontsize = 14;
penwidth = 3;
compound=true;
rankdir=LR;
node [shape = record];
edge [fontname = "Arial", fontsize = 12, color="darkgreen" ];
image[label="Image",color=blue];
registry[label="Registry",color=blue];
tar[label="Tar files",color=blue];
subgraph cluster_container {
label = "Container";
style = "bold";
color = blue;
edge [fontname = "Arial", fontsize = 11, color="skyblue" ];
//node [style=filled];
run[label="Running",shape=circle, style=filled, fillcolor=green];
stop[label="Stopped",shape=circle, style=filled, fillcolor=red];
pause[label="Paused",shape=circle, style=filled, fillcolor=blue];
run->pause[label="pause"];
pause->run[label="unpause"];
run->run[label="restart"];
run->stop[label="kill"];
stop->run[label="start"];
}
run->image[label="commit",ltail=cluster_container];
image->run[label="start"];
image->tar[label="export|save"];
tar->image[label="import"];
image->registry[label="push"];
registry->image[label="pull"];
//heat[label="heat commands",color=blue];
//heatshell[label="heatclient.shell.HeatShell",color=blue];
//shell[label="{heatclient.v1.shell|+do_stack_create\l+do_stack_show\l+do_stack_update\l...\l+do_event_list\l...\l+do_resource_list\l...\l+do_resource_type_show\l...\l+do_template_show\l...\l}",color=blue];
//heatclient[label="heatclient.client.Client",color=blue];
//client[label="heatclient.v1.client.Client",color=blue];
//httpclient[label="heatclient.common.http.HTTPClient",color=blue];
//openstackservices[label="{OpenStack Services|+Nova\l+Neutron\l+Keystone\l...}",color=blue];
//{rank=same; image cluster_container}
//{rank=same; rpcproxy apimixin}
}

View File

@ -0,0 +1,93 @@
//dot -Tpng cmd_logic.dot -o cmd_logic.png
digraph G {
rankdir=TB;
rankdir=LR;
nodesep=1;
//ranksep=1
fontname = "Microsoft YaHei";
fontsize = 28;
penwidth = 4;
compound=true;
node [shape = record];
edge [fontname = "Arial", fontsize = 20, color="darkgreen" ];
user[label="User",color=blue,shape=ellipse, style=filled, fillcolor=green];
dockerfile[label="Dockerfile",color=blue];
daemon[label="Daemon",color=blue];
image[label="Image",color=blue];
registry[label="Registry",color=blue];
tar[label="Tar files",color=blue];
network[label="Network",color=blue]
service[label="Service",color=blue]
swarm[label="Swarm",color=blue]
volume[label="Volume",color=blue]
subgraph cluster_container {
label = "Container";
labelloc = "c";
nodesep=.5;
style = "bold";
color = blue;
edge [fontname = "Arial", fontsize = 20, color="skyblue" ];
//node [style=filled];
create[label="Created",shape=circle, style=filled, fillcolor=lightblue];
run[label="Running",shape=circle, style=filled, fillcolor=green];
pause[label="Paused",shape=circle, style=filled, fillcolor=blue];
stop[label="Stopped",shape=circle, style=filled, fillcolor=red];
exit[label="Exited",shape=circle, style=filled, fillcolor=gray];
create->run[label=<<i>start</i>>];
run->pause[label="pause"];
pause->run[label="unpause"];
run->run[label="restart"];
run->stop[label="stop"];
run->exit[label="kill"];
stop->run[label="start"];
}
//dockerfile
dockerfile->image[label="build"];
//container
run->image[headlabel="commit", labeldistance=7.5, ltail=cluster_container];
run->tar[label="export",ltail=cluster_container];
run->network[label="connect | disconnect",ltail=cluster_container];
//image
image->create[label="create"];
image->run[label="run"];
image->tar[label="save"];
image->registry[label="push"];
//tar
tar->image[label="import | load"];
image->registry[label="push"];
//registry
registry->image[label="pull"];
//network
network->network[label="create | rm | ls | inspect"]
//user
user->run[label="attach | cp | diff | exec | inspect | logs | ps | rename | rm | stats | top | update | wait",lhead=cluster_container]
user->image[label="history | images | rmi | tag"]
user->daemon[label="event | info | version"]
user->registry[label="login | logout | search"]
//heat[label="heat commands",color=blue];
//heatshell[label="heatclient.shell.HeatShell",color=blue];
//shell[label="{heatclient.v1.shell|+do_stack_create\l+do_stack_show\l+do_stack_update\l...\l+do_event_list\l...\l+do_resource_list\l...\l+do_resource_type_show\l...\l+do_template_show\l...\l}",color=blue];
//heatclient[label="heatclient.client.Client",color=blue];
//client[label="heatclient.v1.client.Client",color=blue];
//httpclient[label="heatclient.common.http.HTTPClient",color=blue];
//openstackservices[label="{OpenStack Services|+Nova\l+Neutron\l+Keystone\l...}",color=blue];
//{rank=same; image registry dockerfile tar}
//{rank=same; container}
//{rank=same; user}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 KiB

View File

@ -0,0 +1,51 @@
//dot -Tpng container_status.dot -o container_status.png
digraph G {
rankdir=TB;
rankdir=LR;
nodesep=1;
//ranksep=1
fontname = "Microsoft YaHei";
fontsize = 28;
penwidth = 4;
compound=true;
style = "bold";
color = blue;
node [shape = record];
edge [fontname = "Arial", fontsize = 20, color="darkgreen" ];
image[label="Image",color=blue];
image->create[label="create"];
image->run[label="run"];
edge [fontname = "Arial", fontsize = 20, color="skyblue" ];
//node [style=filled];
create[label="Created",shape=circle, style=filled, fillcolor=lightblue];
run[label="Running",shape=circle, style=filled, fillcolor=green];
pause[label="Paused",shape=circle, style=filled, fillcolor=blue];
stop[label="Stopped",shape=circle, style=filled, fillcolor=red];
exit[label="Exited",shape=circle, style=filled, fillcolor=gray];
create->run[label=<<i>start</i>>];
run->pause[label="pause"];
pause->run[label="unpause"];
run->run[label="restart"];
run->stop[label="stop"];
run->exit[label="kill"];
stop->run[label="start"];
//heat[label="heat commands",color=blue];
//heatshell[label="heatclient.shell.HeatShell",color=blue];
//shell[label="{heatclient.v1.shell|+do_stack_create\l+do_stack_show\l+do_stack_update\l...\l+do_event_list\l...\l+do_resource_list\l...\l+do_resource_type_show\l...\l+do_template_show\l...\l}",color=blue];
//heatclient[label="heatclient.client.Client",color=blue];
//client[label="heatclient.v1.client.Client",color=blue];
//httpclient[label="heatclient.common.http.HTTPClient",color=blue];
//openstackservices[label="{OpenStack Services|+Nova\l+Neutron\l+Keystone\l...}",color=blue];
//{rank=same; image registry dockerfile tar}
//{rank=same; container}
//{rank=same; user}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

344
appendix/best_practices.md Normal file
View File

@ -0,0 +1,344 @@
# Dockerfile 最佳实践
本附录是笔者对 Docker 官方文档中 [Best practices for writing Dockerfiles](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/) 的理解与翻译。
## 一般性的指南和建议
### 容器应该是短暂的
通过 `Dockerfile` 构建的镜像所启动的容器应该尽可能短暂生命周期短短暂意味着可以停止和销毁容器并且创建一个新容器并部署好所需的设置和配置工作量应该是极小的
### 使用 `.dockerignore` 文件
使用 `Dockerfile` 构建镜像时最好是将 `Dockerfile` 放置在一个新建的空目录下然后将构建镜像所需要的文件添加到该目录中为了提高构建镜像的效率你可以在目录下新建一个 `.dockerignore` 文件来指定要忽略的文件和目录`.dockerignore` 文件的排除模式语法和 Git `.gitignore` 文件相似
### 使用多阶段构建
`Docker 17.05` 以上版本中你可以使用 [多阶段构建](../image/multistage-builds.md) 来减少所构建镜像的大小
### 避免安装不必要的包
为了降低复杂性减少依赖减小文件大小节约构建时间你应该避免安装任何不必要的包例如不要在数据库镜像中包含一个文本编辑器
### 一个容器只运行一个进程
应该保证在一个容器中只运行一个进程将多个应用解耦到不同容器中保证了容器的横向扩展和复用例如 web 应用应该包含三个容器web应用数据库缓存
如果容器互相依赖你可以使用 [Docker 自定义网络](../network/linking.md) 来把这些容器连接起来
### 镜像层数尽可能少
你需要在 `Dockerfile` 可读性也包括长期的可维护性和减少层数之间做一个平衡
### 将多行参数排序
将多行参数按字母顺序排序比如要安装多个包时这可以帮助你避免重复包含同一个包更新包列表时也更容易也便于 `PRs` 阅读和审查建议在反斜杠符号 `\` 之前添加一个空格以增加可读性
下面是来自 `buildpack-deps` 镜像的例子
```docker
RUN apt-get update && apt-get install -y \
bzr \
cvs \
git \
mercurial \
subversion
```
### 构建缓存
在镜像的构建过程中Docker 会遍历 `Dockerfile` 文件中的指令然后按顺序执行在执行每条指令之前Docker 都会在缓存中查找是否已经存在可重用的镜像如果有就使用现存的镜像不再重复创建如果你不想在构建过程中使用缓存你可以在 `docker build` 命令中使用 `--no-cache=true` 选项
但是如果你想在构建的过程中使用缓存你得明白什么时候会什么时候不会找到匹配的镜像遵循的基本规则如下
* 从一个基础镜像开始`FROM` 指令指定下一条指令将和该基础镜像的所有子镜像进行匹配检查这些子镜像被创建时使用的指令是否和被检查的指令完全一样如果不是则缓存失效
* 在大多数情况下只需要简单地对比 `Dockerfile` 中的指令和子镜像然而有些指令需要更多的检查和解释
* 对于 `ADD` `COPY` 指令镜像中对应文件的内容也会被检查每个文件都会计算出一个校验和文件的最后修改时间和最后访问时间不会纳入校验在缓存的查找过程中会将这些校验和和已存在镜像中的文件校验和进行对比如果文件有任何改变比如内容和元数据则缓存失效
* 除了 `ADD` `COPY` 指令缓存匹配过程不会查看临时容器中的文件来决定缓存是否匹配例如当执行完 `RUN apt-get -y update` 指令后容器中一些文件被更新 Docker 不会检查这些文件这种情况下只有指令字符串本身被用来匹配缓存
一旦缓存失效所有后续的 `Dockerfile` 指令都将产生新的镜像缓存不会被使用
## Dockerfile 指令
下面针对 `Dockerfile` 中各种指令的最佳编写方式给出建议
### FROM
尽可能使用当前官方仓库作为你构建镜像的基础推荐使用 [Alpine](https://hub.docker.com/_/alpine/) 镜像,因为它被严格控制并保持最小尺寸(目前小于 5 MB但它仍然是一个完整的发行版。
### LABEL
你可以给镜像添加标签来帮助组织镜像记录许可信息辅助自动化构建等每个标签一行 `LABEL` 开头加上一个或多个标签对下面的示例展示了各种不同的可能格式`#` 开头的行是注释内容
>注意如果你的字符串中包含空格必须将字符串放入引号中或者对空格使用转义如果字符串内容本身就包含引号必须对引号使用转义
```docker
# Set one or more individual labels
LABEL com.example.version="0.0.1-beta"
LABEL vendor="ACME Incorporated"
LABEL com.example.release-date="2015-02-12"
LABEL com.example.version.is-production=""
```
一个镜像可以包含多个标签但建议将多个标签放入到一个 `LABEL` 指令中
```docker
# Set multiple labels at once, using line-continuation characters to break long lines
LABEL vendor=ACME\ Incorporated \
com.example.is-beta= \
com.example.is-production="" \
com.example.version="0.0.1-beta" \
com.example.release-date="2015-02-12"
```
关于标签可以接受的键值对参考 [Understanding object labels](https://docs.docker.com/config/labels-custom-metadata/)。关于查询标签信息,参考 [Managing labels on objects](https://docs.docker.com/config/labels-custom-metadata/)。
### RUN
为了保持 `Dockerfile` 文件的可读性可理解性以及可维护性建议将长的或复杂的 `RUN` 指令用反斜杠 `\` 分割成多行
#### apt-get
`RUN` 指令最常见的用法是安装包用的 `apt-get`因为 `RUN apt-get` 指令会安装包所以有几个问题需要注意
不要使用 `RUN apt-get upgrade` `dist-upgrade`因为许多基础镜像中的必须包不会在一个非特权容器中升级如果基础镜像中的某个包过时了你应该联系它的维护者如果你确定某个特定的包比如 `foo`需要升级使用 `apt-get install -y foo` 就行该指令会自动升级 `foo`
永远将 `RUN apt-get update` `apt-get install` 组合成一条 `RUN` 声明例如
```docker
RUN apt-get update && apt-get install -y \
package-bar \
package-baz \
package-foo
```
`apt-get update` 放在一条单独的 `RUN` 声明中会导致缓存问题以及后续的 `apt-get install` 失败比如假设你有一个 `Dockerfile` 文件
```docker
FROM ubuntu:18.04
RUN apt-get update
RUN apt-get install -y curl
```
构建镜像后所有的层都在 Docker 的缓存中假设你后来又修改了其中的 `apt-get install` 添加了一个包
```docker
FROM ubuntu:18.04
RUN apt-get update
RUN apt-get install -y curl nginx
```
Docker 发现修改后的 `RUN apt-get update` 指令和之前的完全一样所以`apt-get update` 不会执行而是使用之前的缓存镜像因为 `apt-get update` 没有运行后面的 `apt-get install` 可能安装的是过时的 `curl` `nginx` 版本
使用 `RUN apt-get update && apt-get install -y` 可以确保你的 Dockerfiles 每次安装的都是包的最新的版本而且这个过程不需要进一步的编码或额外干预这项技术叫作 `cache busting`你也可以显示指定一个包的版本号来达到 `cache-busting`这就是所谓的固定版本例如
```docker
RUN apt-get update && apt-get install -y \
package-bar \
package-baz \
package-foo=1.3.*
```
固定版本会迫使构建过程检索特定的版本而不管缓存中有什么这项技术也可以减少因所需包中未预料到的变化而导致的失败
下面是一个 `RUN` 指令的示例模板展示了所有关于 `apt-get` 的建议
```docker
RUN apt-get update && apt-get install -y \
aufs-tools \
automake \
build-essential \
curl \
dpkg-sig \
libcap-dev \
libsqlite3-dev \
mercurial \
reprepro \
ruby1.9.1 \
ruby1.9.1-dev \
s3cmd=1.1.* \
&& rm -rf /var/lib/apt/lists/*
```
其中 `s3cmd` 指令指定了一个版本号 `1.1.*`如果之前的镜像使用的是更旧的版本指定新的版本会导致 `apt-get update` 缓存失效并确保安装的是新版本
另外清理掉 apt 缓存 `var/lib/apt/lists` 可以减小镜像大小因为 `RUN` 指令的开头为 `apt-get update`包缓存总是会在 `apt-get install` 之前刷新
> 注意官方的 Debian Ubuntu 镜像会自动运行 apt-get clean所以不需要显式的调用 apt-get clean
### CMD
`CMD` 指令用于执行目标镜像中包含的软件可以包含参数`CMD` 大多数情况下都应该以 `CMD ["executable", "param1", "param2"...]` 的形式使用因此如果创建镜像的目的是为了部署某个服务(比如 `Apache`)你可能会执行类似于 `CMD ["apache2", "-DFOREGROUND"]` 形式的命令我们建议任何服务镜像都使用这种形式的命令
多数情况下`CMD` 都需要一个交互式的 `shell` (bash, Python, perl )例如 `CMD ["perl", "-de0"]`或者 `CMD ["PHP", "-a"]`使用这种形式意味着当你执行类似 `docker run -it python` 你会进入一个准备好的 `shell` `CMD` 应该在极少的情况下才能以 `CMD ["param", "param"]` 的形式与 `ENTRYPOINT` 协同使用除非你和你的镜像使用者都对 `ENTRYPOINT` 的工作方式十分熟悉
### EXPOSE
`EXPOSE` 指令用于指定容器将要监听的端口因此你应该为你的应用程序使用常见的端口例如提供 `Apache` web 服务的镜像应该使用 `EXPOSE 80`而提供 `MongoDB` 服务的镜像使用 `EXPOSE 27017`
对于外部访问用户可以在执行 `docker run` 时使用一个标志来指示如何将指定的端口映射到所选择的端口
### ENV
为了方便新程序运行你可以使用 `ENV` 来为容器中安装的程序更新 `PATH` 环境变量例如使用 `ENV PATH /usr/local/nginx/bin:$PATH` 来确保 `CMD ["nginx"]` 能正确运行
`ENV` 指令也可用于为你想要容器化的服务提供必要的环境变量比如 Postgres 需要的 `PGDATA`
最后`ENV` 也能用于设置常见的版本号比如下面的示例
```docker
ENV PG_MAJOR 9.3
ENV PG_VERSION 9.3.4
RUN curl -SL http://example.com/postgres-$PG_VERSION.tar.xz | tar -xJC /usr/src/postgress && …
ENV PATH /usr/local/postgres-$PG_MAJOR/bin:$PATH
```
类似于程序中的常量这种方法可以让你只需改变 `ENV` 指令来自动的改变容器中的软件版本
### ADD COPY
虽然 `ADD` `COPY` 功能类似但一般优先使用 `COPY`因为它比 `ADD` 更透明`COPY` 只支持简单将本地文件拷贝到容器中 `ADD` 有一些并不明显的功能比如本地 tar 提取和远程 URL 支持因此`ADD` 的最佳用例是将本地 tar 文件自动提取到镜像中例如 `ADD rootfs.tar.xz`
如果你的 `Dockerfile` 有多个步骤需要使用上下文中不同的文件单独 `COPY` 每个文件而不是一次性的 `COPY` 所有文件这将保证每个步骤的构建缓存只在特定的文件变化时失效例如
```docker
COPY requirements.txt /tmp/
RUN pip install --requirement /tmp/requirements.txt
COPY . /tmp/
```
如果将 `COPY . /tmp/` 放置在 `RUN` 指令之前只要 `.` 目录中任何一个文件变化都会导致后续指令的缓存失效
为了让镜像尽量小最好不要使用 `ADD` 指令从远程 URL 获取包而是使用 `curl` `wget`这样你可以在文件提取完之后删掉不再需要的文件来避免在镜像中额外添加一层比如尽量避免下面的用法
```docker
ADD http://example.com/big.tar.xz /usr/src/things/
RUN tar -xJf /usr/src/things/big.tar.xz -C /usr/src/things
RUN make -C /usr/src/things all
```
而是应该使用下面这种方法
```docker
RUN mkdir -p /usr/src/things \
&& curl -SL http://example.com/big.tar.xz \
| tar -xJC /usr/src/things \
&& make -C /usr/src/things all
```
上面使用的管道操作所以没有中间文件需要删除
对于其他不需要 `ADD` 的自动提取功能的文件或目录你应该使用 `COPY`
### ENTRYPOINT
`ENTRYPOINT` 的最佳用处是设置镜像的主命令允许将镜像当成命令本身来运行 `CMD` 提供默认选项
例如下面的示例镜像提供了命令行工具 `s3cmd`:
```docker
ENTRYPOINT ["s3cmd"]
CMD ["--help"]
```
现在直接运行该镜像创建的容器会显示命令帮助
```bash
$ docker run s3cmd
```
或者提供正确的参数来执行某个命令
```bash
$ docker run s3cmd ls s3://mybucket
```
这样镜像名可以当成命令行的参考
`ENTRYPOINT` 指令也可以结合一个辅助脚本使用和前面命令行风格类似即使启动工具需要不止一个步骤
例如`Postgres` 官方镜像使用下面的脚本作为 `ENTRYPOINT`
```bash
#!/bin/bash
set -e
if [ "$1" = 'postgres' ]; then
chown -R postgres "$PGDATA"
if [ -z "$(ls -A "$PGDATA")" ]; then
gosu postgres initdb
fi
exec gosu postgres "$@"
fi
exec "$@"
```
>注意该脚本使用了 Bash 的内置命令 exec所以最后运行的进程就是容器的 PID 1 的进程这样进程就可以接收到任何发送给容器的 Unix 信号了
该辅助脚本被拷贝到容器并在容器启动时通过 `ENTRYPOINT` 执行
```docker
COPY ./docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
```
该脚本可以让用户用几种不同的方式和 `Postgres` 交互
你可以很简单地启动 `Postgres`
```bash
$ docker run postgres
```
也可以执行 `Postgres` 并传递参数
```bash
$ docker run postgres postgres --help
```
最后你还可以启动另外一个完全不同的工具比如 `Bash`
```bash
$ docker run --rm -it postgres bash
```
### VOLUME
`VOLUME` 指令用于暴露任何数据库存储文件配置文件或容器创建的文件和目录强烈建议使用 `VOLUME` 来管理镜像中的可变部分和用户可以改变的部分
### USER
如果某个服务不需要特权执行建议使用 `USER` 指令切换到非 root 用户先在 `Dockerfile` 中使用类似 `RUN groupadd -r postgres && useradd -r -g postgres postgres` 的指令创建用户和用户组
>注意在镜像中用户和用户组每次被分配的 UID/GID 都是不确定的下次重新构建镜像时被分配到的 UID/GID 可能会不一样如果要依赖确定的 UID/GID你应该显式的指定一个 UID/GID
你应该避免使用 `sudo`因为它不可预期的 TTY 和信号转发行为可能造成的问题比它能解决的问题还多如果你真的需要和 `sudo` 类似的功能例如 root 权限初始化某个守护进程以非 root 权限执行它你可以使用 [gosu](https://github.com/tianon/gosu)。
最后为了减少层数和复杂度避免频繁地使用 `USER` 来回切换用户
### WORKDIR
为了清晰性和可靠性你应该总是在 `WORKDIR` 中使用绝对路径另外你应该使用 `WORKDIR` 来替代类似于 `RUN cd ... && do-something` 的指令后者难以阅读排错和维护
## 官方镜像示例
这些官方镜像的 Dockerfile 都是参考典范https://github.com/docker-library/docs

View File

@ -0,0 +1,13 @@
# Docker 命令查询
## 基本语法
Docker 命令有两大类客户端命令和服务端命令前者是主要的操作接口后者用来启动 Docker Daemon
* 客户端命令基本命令格式为 `docker [OPTIONS] COMMAND [arg...]`
* 服务端命令基本命令格式为 `dockerd [OPTIONS]`
可以通过 `man docker` `docker help` 来查看这些命令
接下来的小节对这两个命令进行介绍

View File

@ -0,0 +1,70 @@
# 客户端命令(docker)
## 客户端命令选项
* `--config=""`指定客户端配置文件默认为 `~/.docker`
* `-D=true|false`是否使用 debug 模式默认不开启
* `-H, --host=[]`指定命令对应 Docker 守护进程的监听接口可以为 unix 套接字 `unix:///path/to/socket`文件句柄 `fd://socketfd` tcp 套接字 `tcp://[host[:port]]`默认为 `unix:///var/run/docker.sock`
* `-l, --log-level="debug|info|warn|error|fatal"`指定日志输出级别
* `--tls=true|false`是否对 Docker 守护进程启用 TLS 安全机制默认为否
* `--tlscacert=/.docker/ca.pem`TLS CA 签名的可信证书文件路径
* `--tlscert=/.docker/cert.pem`TLS 可信证书文件路径
* `--tlscert=/.docker/key.pem`TLS 密钥文件路径
* `--tlsverify=true|false`启用 TLS 校验默认为否
## 客户端命令
可以通过 `docker COMMAND --help` 来查看这些命令的具体用法
* `attach`依附到一个正在运行的容器中
* `build`从一个 Dockerfile 创建一个镜像
* `commit`从一个容器的修改中创建一个新的镜像
* `cp`在容器和本地宿主系统之间复制文件中
* `create`创建一个新容器但并不运行它
* `diff`检查一个容器内文件系统的修改包括修改和增加
* `events`从服务端获取实时的事件
* `exec`在运行的容器内执行命令
* `export`导出容器内容为一个 `tar`
* `history`显示一个镜像的历史信息
* `images`列出存在的镜像
* `import`导入一个文件典型为 `tar` 路径或目录来创建一个本地镜像
* `info`显示一些相关的系统信息
* `inspect`显示一个容器的具体配置信息
* `kill`关闭一个运行中的容器 (包括进程和所有相关资源)
* `load`从一个 tar 包中加载一个镜像
* `login`注册或登录到一个 Docker 的仓库服务器
* `logout` Docker 的仓库服务器登出
* `logs`获取容器的 log 信息
* `network`管理 Docker 的网络包括查看创建删除挂载卸载等
* `node`管理 swarm 集群中的节点包括查看更新删除提升/取消管理节点等
* `pause`暂停一个容器中的所有进程
* `port`查找一个 nat 到一个私有网口的公共口
* `ps`列出主机上的容器
* `pull`从一个Docker的仓库服务器下拉一个镜像或仓库
* `push`将一个镜像或者仓库推送到一个 Docker 的注册服务器
* `rename`重命名一个容器
* `restart`重启一个运行中的容器
* `rm`删除给定的若干个容器
* `rmi`删除给定的若干个镜像
* `run`创建一个新容器并在其中运行给定命令
* `save`保存一个镜像为 tar 包文件
* `search` Docker index 中搜索一个镜像
* `service`管理 Docker 所启动的应用服务包括创建更新删除等
* `start`启动一个容器
* `stats`输出一个或多个容器的资源使用统计信息
* `stop`终止一个运行中的容器
* `swarm`管理 Docker swarm 集群包括创建加入退出更新等
* `tag`为一个镜像打标签
* `top`查看一个容器中的正在运行的进程信息
* `unpause`将一个容器内所有的进程从暂停状态中恢复
* `update`更新指定的若干容器的配置信息
* `version`输出 Docker 的版本信息
* `volume`管理 Docker volume包括查看创建删除等
* `wait`阻塞直到一个容器终止然后输出它的退出符
## 一张图总结 Docker 的命令
![Docker 命令总结](../_images/cmd_logic.png)
## 参考
* [官方文档](https://docs.docker.com/engine/reference/commandline/cli/)

View File

@ -0,0 +1,58 @@
# 服务端命令(dockerd)
## dockerd 命令选项
* `--api-cors-header=""`CORS 头部域默认不允许 CORS要允许任意的跨域访问可以指定为 "*"
* `--authorization-plugin=""`载入认证的插件
* `-b=""`将容器挂载到一个已存在的网桥上指定为 `none` 时则禁用容器的网络 `--bip` 选项互斥
* `--bip=""`让动态创建的 `docker0` 网桥采用给定的 CIDR 地址; `-b` 选项互斥
* `--cgroup-parent=""`指定 cgroup 的父组默认 fs cgroup 驱动为 `/docker`systemd cgroup 驱动为 `system.slice`
* `--cluster-store=""`构成集群 `Swarm`集群键值数据库服务地址
* `--cluster-advertise=""`构成集群时自身的被访问地址可以为 `host:port` `interface:port`
* `--cluster-store-opt=""`构成集群时键值数据库的配置选项
* `--config-file="/etc/docker/daemon.json"`daemon 配置文件路径
* `--containerd=""`containerd 文件的路径
* `-D, --debug=true|false`是否使用 Debug 模式缺省为 false
* `--default-gateway=""`容器的 IPv4 网关地址必须在网桥的子网段内
* `--default-gateway-v6=""`容器的 IPv6 网关地址
* `--default-ulimit=[]`默认的 ulimit
* `--disable-legacy-registry=true|false`是否允许访问旧版本的镜像仓库服务器
* `--dns=""`指定容器使用的 DNS 服务器地址
* `--dns-opt=""`DNS 选项
* `--dns-search=[]`DNS 搜索域
* `--exec-opt=[]`运行时的执行选项
* `--exec-root=""`容器执行状态文件的根路径默认为 `/var/run/docker`
* `--fixed-cidr=""`限定分配 IPv4 地址范围
* `--fixed-cidr-v6=""`限定分配 IPv6 地址范围
* `-G, --group=""`分配给 unix 套接字的组默认为 `docker`
* `-g, --graph=""`Docker 运行时的根路径默认为 `/var/lib/docker`
* `-H, --host=[]`指定命令对应 Docker daemon 的监听接口可以为 unix 套接字 `unix:///path/to/socket`文件句柄 `fd://socketfd` tcp 套接字 `tcp://[host[:port]]`默认为 `unix:///var/run/docker.sock`
* `--icc=true|false`是否启用容器间以及跟 daemon 所在主机的通信默认为 true
* `--insecure-registry=[]`允许访问给定的非安全仓库服务
* `--ip=""`绑定容器端口时候的默认 IP 地址缺省为 `0.0.0.0`
* `--ip-forward=true|false`是否检查启动在 Docker 主机上的启用 IP 转发服务默认开启注意关闭该选项将不对系统转发能力进行任何检查修改
* `--ip-masq=true|false`是否进行地址伪装用于容器访问外部网络默认开启
* `--iptables=true|false`是否允许 Docker 添加 iptables 规则缺省为 true
* `--ipv6=true|false`是否启用 IPv6 支持默认关闭
* `-l, --log-level="debug|info|warn|error|fatal"`指定日志输出级别
* `--label="[]"`添加指定的键值对标注
* `--log-driver="json-file|syslog|journald|gelf|fluentd|awslogs|splunk|etwlogs|gcplogs|none"`指定日志后端驱动默认为 `json-file`
* `--log-opt=[]`日志后端的选项
* `--mtu=VALUE`指定容器网络的 `mtu`
* `-p=""`指定 daemon PID 文件路径缺省为 `/var/run/docker.pid`
* `--raw-logs`输出原始未加色彩的日志信息
* `--registry-mirror=<scheme>://<host>`指定 `docker pull` 时使用的注册服务器镜像地址
* `-s, --storage-driver=""`指定使用给定的存储后端
* `--selinux-enabled=true|false`是否启用 SELinux 支持缺省值为 falseSELinux 目前尚不支持 overlay 存储驱动
* `--storage-opt=[]`驱动后端选项
* `--tls=true|false`是否对 Docker daemon 启用 TLS 安全机制默认为否
* `--tlscacert=/.docker/ca.pem`TLS CA 签名的可信证书文件路径
* `--tlscert=/.docker/cert.pem`TLS 可信证书文件路径
* `--tlscert=/.docker/key.pem`TLS 密钥文件路径
* `--tlsverify=true|false`启用 TLS 校验默认为否
* `--userland-proxy=true|false`是否使用用户态代理来实现容器间和出容器的回环通信默认为 true
* `--userns-remap=default|uid:gid|user:group|user|uid`指定容器的用户命名空间默认是创建新的 UID GID 映射到容器内进程
## 参考
* [官方文档](https://docs.docker.com/engine/reference/commandline/dockerd/)

42
appendix/debug.md Normal file
View File

@ -0,0 +1,42 @@
# 如何调试 Docker
## 开启 Debug 模式
dockerd 配置文件 daemon.json默认位于 /etc/docker/中添加
```json
{
"debug": true
}
```
重启守护进程
```bash
$ sudo kill -SIGHUP $(pidof dockerd)
```
此时 dockerd 会在日志中输入更多信息供分析
## 检查内核日志
```bash
$ sudo dmesg |grep dockerd
$ sudo dmesg |grep runc
```
## Docker 不响应时处理
可以杀死 dockerd 进程查看其堆栈调用情况
```bash
$ sudo kill -SIGUSR1 $(pidof dockerd)
```
## 重置 Docker 本地数据
*注意本操作会移除所有的 Docker 本地数据包括镜像和容器等*
```bash
$ sudo rm -rf /var/lib/docker
```

221
appendix/faq/README.md Normal file
View File

@ -0,0 +1,221 @@
# 常见问题总结
## 镜像相关
### 如何批量清理临时镜像文件
可以使用 `docker image prune` 命令
### 如何查看镜像支持的环境变量
可以使用 `docker run IMAGE env` 命令
### 本地的镜像文件都存放在哪里
Docker 相关的本地资源默认存放在 `/var/lib/docker/` 目录下 `overlay2` 文件系统为例其中 `containers` 目录存放容器信息`image` 目录存放镜像信息`overlay2` 目录下存放具体的镜像层文件
### 构建 Docker 镜像应该遵循哪些原则
整体原则上尽量保持镜像功能的明确和内容的精简要点包括
* 尽量选取满足需求但较小的基础系统镜像例如大部分时候可以选择 `alpine` 镜像仅有不足六兆大小
* 清理编译生成文件安装包的缓存等临时文件
* 安装各个软件时候要指定准确的版本号并避免引入不需要的依赖
* 从安全角度考虑应用要尽量使用系统的库和依赖
* 如果安装应用时候需要配置一些特殊的环境变量在安装后要还原不需要保持的变量值
* 使用 Dockerfile 创建镜像时候要添加 .dockerignore 文件或使用干净的工作目录
更多内容请查看 [Dockerfile 最佳实践](../best_practices.md)
### 碰到网络问题无法 pull 镜像命令行指定 http_proxy 无效
Docker 配置文件中添加 `export http_proxy="http://<PROXY_HOST>:<PROXY_PORT>"`之后重启 Docker 服务即可
## 容器相关
### 容器退出后通过 docker container ls 命令查看不到数据会丢失么
容器退出后会处于终止exited状态此时可以通过 `docker container ls -a` 查看其中的数据也不会丢失还可以通过 `docker start` 命令来启动它只有删除掉容器才会清除所有数据
### 如何停止所有正在运行的容器
可以使用 `docker stop $(docker container ls -q)` 命令
### 如何批量清理已经停止的容器
可以使用 `docker container prune` 命令
### 如何获取某个容器的 PID 信息
可以使用
```bash
docker inspect --format '{{ .State.Pid }}' <CONTAINER ID or NAME>
```
### 如何获取某个容器的 IP 地址
可以使用
```bash
docker inspect --format '{{ .NetworkSettings.IPAddress }}' <CONTAINER ID or NAME>
```
### 如何给容器指定一个固定 IP 地址而不是每次重启容器 IP 地址都会变
使用以下命令启动容器可以使容器 IP 固定不变
```bash
$ docker network create -d bridge --subnet 172.25.0.0/16 my-net
$ docker run --network=my-net --ip=172.25.3.3 -itd --name=my-container busybox
```
### 如何临时退出一个正在交互的容器的终端而不终止它
`Ctrl-p Ctrl-q`如果按 `Ctrl-c` 往往会让容器内应用进程终止进而会终止容器
### 使用 `docker port` 命令映射容器的端口时系统报错Error: No public port '80' published for xxx
* 创建镜像时 `Dockerfile` 要通过 `EXPOSE` 指定正确的开放端口
* 容器启动时指定 `PublishAllPort = true`
### 可以在一个容器中同时运行多个应用进程么
一般并不推荐在同一个容器内运行多个应用进程如果有类似需求可以通过一些额外的进程管理机制比如 `supervisord` 来管理所运行的进程可以参考 https://docs.docker.com/config/containers/multi-service_container/ 。
### 如何控制容器占用系统资源CPU内存的份额
在使用 `docker create` 命令创建容器或使用 `docker run` 创建并启动容器的时候可以使用 -c|--cpu-shares[=0] 参数来调整容器使用 CPU 的权重使用 -m|--memory[=MEMORY] 参数来调整容器使用内存的大小
## 仓库相关
### 仓库Repository注册服务器Registry注册索引Index 有何关系
首先仓库是存放一组关联镜像的集合比如同一个应用的不同版本的镜像
注册服务器是存放实际的镜像文件的地方注册索引则负责维护用户的账号权限搜索标签等的管理因此注册服务器利用注册索引来实现认证等管理
## 配置相关
### Docker 的配置文件放在哪里如何修改配置
使用 `systemd` 的系统 Ubuntu 16.04Centos 的配置文件在 `/etc/docker/daemon.json`
### 如何更改 Docker 的默认存储位置
Docker 的默认存储位置是 `/var/lib/docker`如果希望将 Docker 的本地文件存储到其他分区可以使用 Linux 软连接的方式来完成或者在启动 daemon 时通过 `-g` 参数指定或者修改配置文件 `/etc/docker/daemon.json` "data-root" 可以使用 `docker system info | grep "Root Dir"` 查看当前使用的存储位置
例如如下操作将默认存储位置迁移到 /storage/docker
```sh
[root@s26 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 50G 5.3G 42G 12% /
tmpfs 48G 228K 48G 1% /dev/shm
/dev/sda1 485M 40M 420M 9% /boot
/dev/mapper/VolGroup-lv_home 222G 188M 210G 1% /home
/dev/sdb2 2.7T 323G 2.3T 13% /storage
[root@s26 ~]# service docker stop
[root@s26 ~]# cd /var/lib/
[root@s26 lib]# mv docker /storage/
[root@s26 lib]# ln -s /storage/docker/ docker
[root@s26 lib]# ls -la docker
lrwxrwxrwx. 1 root root 15 11 17 13:43 docker -> /storage/docker
[root@s26 lib]# service docker start
```
### 使用内存和 swap 限制启动容器时候报警告"WARNING: Your kernel does not support cgroup swap limit. WARNING: Your kernel does not support swap limit capabilities. Limitation discarded."
这是因为系统默认没有开启对内存和 swap 使用的统计功能引入该功能会带来性能的下降要开启该功能可以采取如下操作
* 编辑 `/etc/default/grub` 文件Ubuntu 系统为例配置 `GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"`
* 更新 grub`$ sudo update-grub`
* 重启系统即可
## Docker 与虚拟化
### Docker LXCLinux Container有何不同
LXC 利用 Linux 上相关技术实现了容器Docker 则在如下的几个方面进行了改进
* 移植性通过抽象容器配置容器可以实现从一个平台移植到另一个平台
* 镜像系统基于 OverlayFS 的镜像系统为容器的分发带来了很多的便利同时共同的镜像层只需要存储一份实现高效率的存储
* 版本管理类似于Git的版本管理理念用户可以更方便的创建管理镜像文件
* 仓库系统仓库系统大大降低了镜像的分发和管理的成本
* 周边工具各种现有工具配置管理云平台 Docker 的支持以及基于 Docker的 PaaSCI 等系统 Docker 的应用更加方便和多样化
### Docker Vagrant 有何不同
两者的定位完全不同
* Vagrant 类似 Boot2Docker一款运行 Docker 的最小内核是一套虚拟机的管理环境Vagrant 可以在多种系统上和虚拟机软件中运行可以在 WindowsMac 等非 Linux 平台上为 Docker 提供支持自身具有较好的包装性和移植性
* 原生的 Docker 自身只能运行在 Linux 平台上但启动和运行的性能都比虚拟机要快往往更适合快速开发和部署应用的场景
简单说Vagrant 适合用来管理虚拟机 Docker 适合用来管理应用环境
### 开发环境中 Docker Vagrant 该如何选择
Docker 不是虚拟机而是进程隔离对于资源的消耗很少但是目前需要 Linux 环境支持Vagrant 是虚拟机上做的封装虚拟机本身会消耗资源
如果本地使用的 Linux 环境推荐都使用 Docker
如果本地使用的是 macOS 或者 Windows 环境那就需要开虚拟机单一开发环境下 Vagrant 更简单多环境开发下推荐在 Vagrant 里面再使用 Docker 进行环境隔离
## 其它
### Docker 能在非 Linux 平台比如 Windows macOS 上运行么
完全可以安装方法请查看 [安装 Docker](../../install/) 一节
### 如何将一台宿主主机的 Docker 环境迁移到另外一台宿主主机
停止 Docker 服务将整个 Docker 存储文件夹复制到另外一台宿主主机然后调整另外一台宿主主机的配置即可
### 如何进入 Docker 容器的网络命名空间
Docker 在创建容器后删除了宿主主机上 `/var/run/netns` 目录中的相关的网络命名空间文件因此在宿主主机上是无法看到或访问容器的网络命名空间的
用户可以通过如下方法来手动恢复它
首先使用下面的命令查看容器进程信息比如这里的 1234
```bash
$ docker inspect --format='{{. State.Pid}} ' $container_id
1234
```
接下来 `/proc` 目录下把对应的网络命名空间文件链接到 `/var/run/netns` 目录
```bash
$ sudo ln -s /proc/1234/ns/net /var/run/netns/
```
然后在宿主主机上就可以看到容器的网络命名空间信息例如
```bash
$ sudo ip netns show
1234
```
此时用户可以通过正常的系统命令来查看或操作容器的命名空间了例如修改容器的 IP 地址信息为 `172.17.0.100/16`
```bash
$ sudo ip netns exec 1234 ifconfig eth0 172.17.0.100/16
```
### 如何获取容器绑定到本地那个 veth 接口上
Docker 容器启动后会通过 veth 接口对连接到本地网桥veth 接口命名跟容器命名毫无关系十分难以找到对应关系
最简单的一种方式是通过查看接口的索引号在容器中执行 `ip a` 命令查看到本地接口最前面的接口索引号 `205`将此值加上 1 `206`然后在本地主机执行 `ip a` 命令查找接口索引号为 `206` 的接口两者即为连接的 veth 接口对

3
appendix/repo/README.md Normal file
View File

@ -0,0 +1,3 @@
# 热门镜像介绍
本章将介绍一些热门镜像的功能使用方法等包括 UbuntuCentOSMySQLMongoDBRedisNginxWordpressNode.js

20
appendix/repo/centos.md Normal file
View File

@ -0,0 +1,20 @@
# [CentOS](https://hub.docker.com/_/centos)
## 基本信息
[CentOS](https://en.wikipedia.org/wiki/CentOS) 是流行的 Linux 发行版,其软件包大多跟 RedHat 系列保持一致。
该仓库位于 `https://hub.docker.com/_/centos` 提供了 CentOS 5 ~ 8 各个版本的镜像
## 使用方法
默认会启动一个最小化的 CentOS 环境
```bash
$ docker run --name centos -it centos bash
bash-4.2#
```
## Dockerfile
请到 https://github.com/docker-library/docs/tree/master/centos 查看。

58
appendix/repo/minio.md Normal file
View File

@ -0,0 +1,58 @@
# minio
**MinIO** 是一个基于 Apache License v2.0 开源协议的对象存储服务它兼容亚马逊 S3 云存储服务接口非常适合于存储大容量非结构化的数据例如图片视频日志文件备份数据和容器/虚拟机镜像等而一个对象文件可以是任意大小从几 kb 到最大 5T 不等
MinIO 是一个非常轻量的服务,可以很简单的和其他应用的结合类似 NodeJS, Redis 或者 MySQL
[官方文档](https://docs.min.io/)
## 简单使用
测试开发环境下不考虑数据存储的情况下可以使用下面的命令快速开启服务
```bash
$ docker run -d -p 9000:9000 -p 9090:9090 minio/minio server /data --console-address ':9090'
```
## 离线部署
许多生产环境是一般是没有公网资源的这就需要从有公网资源的服务器上把镜像导出然后导入到需要运行镜像的内网服务器
### 导出镜像
在有公网资源的服务器上下载好`minio/minio`镜像
```bash
$ docker save -o minio.tar minio/minio:latest
```
> 使用docker save 的时候也可以使用image id 来导出但是那样导出的时候就会丢失原来的镜像名称推荐还是使用镜像名字+tag来导出镜像
### 导入镜像
把压缩文件复制到内网服务器上使用下面的命令导入镜像
```bash
$ docker load minio.tar
```
### 运行 minio
- `/mnt/data` 改成要替换的数据目录
- 替换 `MINIO_ROOT_USER` 的值
- 替换 `MINIO_ROOT_PASSWORD` 的值
- 替换 name,minio1(可选)
- 如果 90009090 端口冲突,替换端口前面的如 `9009:9000`
```bash
$ sudo docker run -d -p 9000:9000 -p 9090:9090 --name minio1 \
-e "MINIO_ROOT_USER=改成自己需要的" \
-e "MINIO_ROOT_PASSWORD=改成自己需要的" \
-v /mnt/data:/data \
--restart=always \
minio/minio server /data --console-address ':9090'
```
### 访问 web 管理页面
http://x.x.x.x:9090

34
appendix/repo/mongodb.md Normal file
View File

@ -0,0 +1,34 @@
# [MongoDB](https://hub.docker.com/_/mongo/)
## 基本信息
[MongoDB](https://en.wikipedia.org/wiki/MongoDB) 是开源的 NoSQL 数据库实现。
该仓库位于 `https://hub.docker.com/_/mongo/` 提供了 MongoDB 2.x ~ 4.x 各个版本的镜像
## 使用方法
默认会在 `27017` 端口启动数据库
```bash
$ docker run --name mongo -d mongo
```
使用其他应用连接到容器可以用
```bash
$ docker run --name some-app --link some-mongo:mongo -d application-that-uses-mongo
```
或者通过 `mongo`
```bash
$ docker run -it --rm \
--link some-mongo:mongo \
mongo \
sh -c 'exec mongo "$MONGO_PORT_27017_TCP_ADDR:$MONGO_PORT_27017_TCP_PORT/test"'
```
## Dockerfile
请到 https://github.com/docker-library/docs/tree/master/mongo 查看。

34
appendix/repo/mysql.md Normal file
View File

@ -0,0 +1,34 @@
# [MySQL](https://hub.docker.com/_/mysql/)
## 基本信息
[MySQL](https://en.wikipedia.org/wiki/MySQL) 是开源的关系数据库实现。
该仓库位于 `https://hub.docker.com/_/mysql/` 提供了 MySQL 5.5 ~ 8.x 各个版本的镜像
## 使用方法
默认会在 `3306` 端口启动数据库
```bash
$ docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=mysecretpassword -d mysql
```
之后就可以使用其它应用来连接到该容器
```bash
$ docker run --name some-app --link some-mysql:mysql -d application-that-uses-mysql
```
或者通过 `mysql` 命令行连接
```bash
$ docker run -it --rm \
--link some-mysql:mysql \
mysql \
sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'
```
## Dockerfile
请到 https://github.com/docker-library/docs/tree/master/mysql 查看

49
appendix/repo/nginx.md Normal file
View File

@ -0,0 +1,49 @@
# [Nginx](https://hub.docker.com/_/nginx/)
## 基本信息
[Nginx](https://en.wikipedia.org/wiki/Nginx) 是开源的高效的 Web 服务器实现,支持 HTTP、HTTPS、SMTP、POP3、IMAP 等协议。
该仓库位于 `https://hub.docker.com/_/nginx/` 提供了 Nginx 1.0 ~ 1.19.x 各个版本的镜像
## 使用方法
下面的命令将作为一个静态页面服务器启动
```bash
$ docker run --name some-nginx -v /some/content:/usr/share/nginx/html:ro -d nginx
```
用户也可以不使用这种映射方式通过利用 Dockerfile 来直接将静态页面内容放到镜像中内容为
```docker
FROM nginx
COPY static-html-directory /usr/share/nginx/html
```
之后生成新的镜像并启动一个容器
```bash
$ docker build -t some-content-nginx .
$ docker run --name some-nginx -d some-content-nginx
```
开放端口并映射到本地的 `8080` 端口
```bash
$ docker run --name some-nginx -d -p 8080:80 some-content-nginx
```
Nginx的默认配置文件路径为 `/etc/nginx/nginx.conf`可以通过映射它来使用本地的配置文件例如
```bash
$ docker run -d \
--name some-nginx \
-p 8080:80 \
-v /path/nginx.conf:/etc/nginx/nginx.conf:ro \
nginx
```
## Dockerfile
请到 https://github.com/docker-library/docs/tree/master/nginx 查看。

40
appendix/repo/nodejs.md Normal file
View File

@ -0,0 +1,40 @@
# [Node.js](https://hub.docker.com/_/node/)
## 基本信息
[Node.js](https://en.wikipedia.org/wiki/Node.js) 是基于 JavaScript 的可扩展服务端和网络软件开发平台。
该仓库位于 `https://hub.docker.com/_/node/` 提供了 Node.js 0.10 ~ 14.x 各个版本的镜像
## 使用方法
在项目中创建一个 Dockerfile
```docker
FROM node:12
# replace this with your application's default port
EXPOSE 8888
```
然后创建镜像并启动容器
```bash
$ docker build -t my-nodejs-app
$ docker run -it --rm --name my-running-app my-nodejs-app
```
也可以直接运行一个简单容器
```bash
$ docker run -it --rm \
--name my-running-script \
# -v "$(pwd)":/usr/src/myapp \
--mount type=bind,src=`$(pwd)`,target=/usr/src/myapp \
-w /usr/src/myapp \
node:12-alpine \
node your-daemon-or-script.js
```
## Dockerfile
请到 https://github.com/docker-library/docs/tree/master/node 查看。

19
appendix/repo/php.md Normal file
View File

@ -0,0 +1,19 @@
# [PHP](https://hub.docker.com/_/php/)
## 基本信息
[PHP](https://en.wikipedia.org/wiki/Php)Hypertext Preprocessor 超文本预处理器的字母缩写)是一种被广泛应用的开放源代码的多用途脚本语言,它可嵌入到 HTML 中,尤其适合 web 开发。
该仓库位于 `https://hub.docker.com/_/php/` 提供了 PHP 5.x ~ 8.x 各个版本的镜像
## 使用方法
下面的命令将运行一个已有的 PHP 脚本
```bash
$ docker run -it --rm -v "$PWD":/app -w /app php:alpine php your-script.php
```
## Dockerfile
请到 https://github.com/docker-library/docs/tree/master/php 查看。

42
appendix/repo/redis.md Normal file
View File

@ -0,0 +1,42 @@
# [Redis](https://hub.docker.com/_/redis/)
## 基本信息
[Redis](https://en.wikipedia.org/wiki/Redis) 是开源的内存 Key-Value 数据库实现。
该仓库位于 `https://hub.docker.com/_/redis/` 提供了 Redis 3.x ~ 6.x 各个版本的镜像
## 使用方法
默认会在 `6379` 端口启动数据库
```bash
$ docker run --name some-redis -d -p 6379:6379 redis
```
另外还可以启用 [持久存储](https://redis.io/topics/persistence)。
```bash
$ docker run --name some-redis -d -p 6379:6379 redis redis-server --appendonly yes
```
默认数据存储位置在 `VOLUME/data`可以使用 `--volumes-from some-volume-container` `-v /docker/host/dir:/data` 将数据存放到本地
使用其他应用连接到容器可以用
```bash
$ docker run --name some-app --link some-redis:redis -d application-that-uses-redis
```
或者通过 `redis-cli`
```bash
$ docker run -it --rm \
--link some-redis:redis \
redis \
sh -c 'exec redis-cli -h "$REDIS_PORT_6379_TCP_ADDR" -p "$REDIS_PORT_6379_TCP_PORT"'
```
## Dockerfile
请到 https://github.com/docker-library/docs/tree/master/redis 查看。

20
appendix/repo/ubuntu.md Normal file
View File

@ -0,0 +1,20 @@
# [Ubuntu](https://hub.docker.com/_/ubuntu/)
## 基本信息
[Ubuntu](https://en.wikipedia.org/wiki/Ubuntu) 是流行的 Linux 发行版,其自带软件版本往往较新一些。
该仓库位于 `https://hub.docker.com/_/ubuntu/` 提供了 Ubuntu 12.04 ~ 20.04 各个版本的镜像
## 使用方法
默认会启动一个最小化的 Ubuntu 环境
```bash
$ docker run --name some-ubuntu -it ubuntu:20.04
root@523c70904d54:/#
```
## Dockerfile
请到 https://github.com/docker-library/docs/tree/master/ubuntu 查看。

View File

@ -0,0 +1,25 @@
# [WordPress](https://hub.docker.com/_/wordpress/)
## 基本信息
[WordPress](https://en.wikipedia.org/wiki/WordPress) 是开源的 Blog 和内容管理系统框架,它基于 PHP 和 MySQL。
该仓库位于 `https://hub.docker.com/_/wordpress/` 提供了 WordPress 4.x ~ 5.x 版本的镜像
## 使用方法
启动容器需要 MySQL 的支持默认端口为 `80`
```bash
$ docker run --name some-wordpress --link some-mysql:mysql -d wordpress
```
启动 WordPress 容器时可以指定的一些环境变量包括
* `WORDPRESS_DB_USER` 缺省为 `root`
* `WORDPRESS_DB_PASSWORD` 缺省为连接 mysql 容器的环境变量 `MYSQL_ROOT_PASSWORD` 的值
* `WORDPRESS_DB_NAME` 缺省为 `wordpress`
## Dockerfile
请到 https://github.com/docker-library/docs/tree/master/wordpress 查看。

28
appendix/resources.md Normal file
View File

@ -0,0 +1,28 @@
# 资源链接
## 官方网站
* Docker 官方主页https://www.docker.com
* Docker 官方博客https://www.docker.com/blog/
* Docker 官方文档https://docs.docker.com/
* Docker Hubhttps://hub.docker.com
* Docker 的源代码仓库https://github.com/moby/moby
* Docker 路线图 https://github.com/docker/roadmap/projects
* Docker 发布版本历史https://docs.docker.com/release-notes/
* Docker 常见问题https://docs.docker.com/engine/faq/
* Docker 远端应用 APIhttps://docs.docker.com/develop/sdk/
## 实践参考
* Dockerfile 参考https://docs.docker.com/engine/reference/builder/
* Dockerfile 最佳实践https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/
## 技术交流
* Docker 邮件列表 https://groups.google.com/forum/#!forum/docker-user
* Docker IRC 频道https://chat.freenode.net#docker
* Docker Twitter 主页https://twitter.com/docker
## 其它
* Docker StackOverflow 问答主页https://stackoverflow.com/search?q=docker

View File

@ -1,121 +0,0 @@
# Docker命令查询
Docker 1.11+ 版本为例
## 基本语法
Docker 命令有两大类客户端命令和服务端命令前者是主要的操作接口后者用来启动 Docker daemon
* 客户端命令基本命令格式为 `docker [OPTIONS] COMMAND [arg...]`
* 服务端命令基本命令格式为 `docker daemon [OPTIONS]`
可以通过 `man docker` 来查看这些命令
## 客户端命令选项
* --config=""指定客户端配置文件默认为 `/.docker`
* -D=true|false是否使用 debug 模式默认不开启
* -H, --host=[]指定命令对应 Docker daemon 的监听接口可以为 unix 套接字unix:///path/to/socket文件句柄fd://socketfd或 tcp 套接字tcp://[host[:port]]),默认为 unix:///var/run/docker.sock
* -l, --log-level="debug|info|warn|error|fatal"指定日志输出级别
* --tls=true|false是否对 Docker daemon 启用 TLS 安全机制默认为否
* --tlscacert= /.docker/ca.pemTLS CA 签名的可信证书文件路径
* --tlscert= /.docker/cert.pemTLS 可信证书文件路径
* --tlscert= /.docker/key.pemTLS 密钥文件路径
* --tlsverify=true|false启用 TLS 校验默认为否
## daemon 命令选项
* --api-cors-header=""CORS 头部域默认不允许 CORS要允许任意的跨域访问可以指定为 *
* --authorization-plugin=""载入认证的插件
* -b=""将容器挂载到一个已存在的网桥上指定为 'none' 时则禁用容器的网络 --bip 选项互斥
* --bip=""让动态创建的 docker0 网桥采用给定的 CIDR 地址; -b 选项互斥
* --cgroup-parent=""指定 cgroup 的父组默认 fs cgroup 驱动为 `/docker`systemd cgroup 驱动为 `system.slice`
* --cluster-store=""构成集群 Swarm集群键值数据库服务地址
* --cluster-advertise=""构成集群时自身的被访问地址可以为 `host:port` `interface:port`
* --cluster-store-opt=""构成集群时键值数据库的配置选项
* --config-file="/etc/docker/daemon.json"daemon 配置文件路径
* --containerd=""containerd 文件的路径
* -D, --debug=true|false是否使用 Debug 模式缺省为 false
* --default-gateway=""容器的 IPv4 网关地址必须在网桥的子网段内
* --default-gateway-v6=""容器的 IPv6 网关地址
* --default-ulimit=[]默认的 ulimit
* --disable-legacy-registry=true|false是否允许访问旧版本的镜像仓库服务器
* --dns=""指定容器使用的 DNS 服务器地址
* --dns-opt=""DNS 选项
* --dns-search=[]DNS 搜索域
* --exec-opt=[]运行时的执行选项
* --exec-root=""容器执行状态文件的根路径默认为 `/var/run/docker`
* --fixed-cidr=""限定分配 IPv4 地址范围
* --fixed-cidr-v6=""限定分配 IPv6 地址范围
* -G, --group=""分配给 unix 套接字的组默认为 `docker`
* -g, --graph=""Docker 运行时的根路径默认为 `/var/lib/docker`
* -H, --host=[]指定命令对应 Docker daemon 的监听接口可以为 unix 套接字unix:///path/to/socket文件句柄fd://socketfd或 tcp 套接字tcp://[host[:port]]),默认为 unix:///var/run/docker.sock
* --icc=true|false是否启用容器间以及跟 daemon 所在主机的通信默认为 true
* --insecure-registry=[]允许访问给定的非安全仓库服务
* --ip=""绑定容器端口时候的默认 IP 地址缺省为 0.0.0.0
* --ip-forward=true|false是否检查启动在 Docker 主机上的启用 IP 转发服务默认开启注意关闭该选项将不对系统转发能力进行任何检查修改
* --ip-masq=true|false是否进行地址伪装用于容器访问外部网络默认开启
* --iptables=true|false是否允许 Docker 添加 iptables 规则缺省为 true
* --ipv6=true|false是否启用 IPv6 支持默认关闭
* -l, --log-level="debug|info|warn|error|fatal"指定日志输出级别
* --label="[]"添加指定的键值对标注
* --log-driver="json-file|syslog|journald|gelf|fluentd|awslogs|splunk|etwlogs|gcplogs|none"指定日志后端驱动默认为 json-file
* --log-opt=[]日志后端的选项
* --mtu=VALUE指定容器网络的 mtu
* -p=""指定 daemon PID 文件路径缺省为 `/var/run/docker.pid`
* --raw-logs输出原始未加色彩的日志信息
* --registry-mirror=<scheme>://<host>:指定 `docker pull` 时使用的注册服务器镜像地址;
* -s, --storage-driver=""指定使用给定的存储后端
* --selinux-enabled=true|false是否启用 SELinux 支持缺省值为 falseSELinux 目前尚不支持 overlay 存储驱动
* --storage-opt=[]驱动后端选项
* --tls=true|false是否对 Docker daemon 启用 TLS 安全机制默认为否
* --tlscacert= /.docker/ca.pemTLS CA 签名的可信证书文件路径
* --tlscert= /.docker/cert.pemTLS 可信证书文件路径
* --tlscert= /.docker/key.pemTLS 密钥文件路径
* --tlsverify=true|false启用 TLS 校验默认为否
* --userland-proxy=true|false是否使用用户态代理来实现容器间和出容器的回环通信默认为 true
* --userns-remap=default|uid:gid|user:group|user|uid指定容器的用户命名空间默认是创建新的 UID GID 映射到容器内进程
## 子命令
可以通过 `man docker-COMMAND` 来查看这些命令的具体用法
* attach依附到一个正在运行的容器中
* build从一个 Dockerfile 创建一个镜像
* commit从一个容器的修改中创建一个新的镜像
* cp在容器和本地宿主系统之间复制文件中
* create创建一个新容器但并不运行它
* diff检查一个容器文件系统的修改
* events从服务端获取实时的事件
* exec在运行的容器内执行命令
* export导出容器内容为一个 tar
* history显示一个镜像的历史信息
* images列出存在的镜像
* import导入一个文件典型为 tar 路径或目录来创建一个本地镜像
* info显示一些相关的系统信息
* inspect显示一个容器的底层具体信息
* kill关闭一个运行中的容器 (包括进程和所有相关资源)
* load从一个 tar 包中加载一个镜像
* login注册或登录到一个 Docker 的仓库服务器
* logout Docker 的仓库服务器登出
* logs获取容器的 log 信息
* pause暂停一个容器中的所有进程
* port查找一个 nat 到一个私有网口的公共口
* ps列出容器
* pull从一个Docker的仓库服务器下拉一个镜像或仓库
* push将一个镜像或者仓库推送到一个 Docker 的注册服务器
* rename重命名一个容器
* restart重启一个运行中的容器
* rm删除给定的若干个容器
* rmi删除给定的若干个镜像
* run创建一个新容器并在其中运行给定命令
* save保存一个镜像为 tar 包文件
* search Docker index 中搜索一个镜像
* start启动一个容器
* stats输出一个或多个容器的资源使用统计信息
* stop终止一个运行中的容器
* tag为一个镜像打标签
* top查看一个容器中的正在运行的进程信息
* unpause将一个容器内所有的进程从暂停状态中恢复
* version输出 Docker 的版本信息
* wait阻塞直到一个容器终止然后输出它的退出符
## 一张图总结 Docker 的命令
![命令周期](../_images/cmd_logic.png)

View File

@ -1,2 +0,0 @@
# 常见仓库介绍
本章将介绍常见的一些仓库和镜像的功能使用方法和生成它们的 Dockerfile 包括 UbuntuCentOSMySQLMongoDBRedisNginxWordpressNode.js

View File

@ -1,17 +0,0 @@
## [CentOS](https://registry.hub.docker.com/_/centos/)
### 基本信息
[CentOS](https://en.wikipedia.org/wiki/CentOS) 是流行的 Linux 发行版,其软件包大多跟 RedHat 系列保持一致。
该仓库提供了 CentOS 5 ~ 7 各个版本的镜像
### 使用方法
默认会启动一个最小化的 CentOS 环境
```
$ sudo docker run --name some-centos -i -t centos bash
bash-4.2#
```
### Dockerfile
* [CentOS 5 版本](https://github.com/CentOS/sig-cloud-instance-images/blob/2e5a9c4e8b7191b393822e4b9e98820db5638a77/docker/Dockerfile)
* [CentOS 6 版本](https://github.com/CentOS/sig-cloud-instance-images/blob/8717e33ea5432ecb33d7ecefe8452a973715d037/docker/Dockerfile)
* [CentOS 7 版本](https://github.com/CentOS/sig-cloud-instance-images/blob/af7a1b9f8f30744360a10fe44c53a1591bef26f9/docker/Dockerfile)

Some files were not shown because too many files have changed in this diff Show More