1173 Commits

Author SHA1 Message Date
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
yeasy
9fa5ff18a7 Update content with latest docker cmd 2016-06-12 18:22:47 +08:00
yeasy
2044998a27 Update README.md 2016-06-12 18:03:38 +08:00
yeasy
a8e690e5f3 Merge pull request #85 from catroll/master
Fix link and figure.
2016-05-25 10:38:08 +08:00
catroll
0cabecc05f Update install/debian.md,Markdown Error 2016-05-25 09:53:45 +08:00
catroll
51c1f16947 Update compose/usage.md, repository/dockerhub.md, fix three hyperlink 2016-05-25 09:32:05 +08:00
catroll
3e04648a41 Update kubernets/intro.md, kubernetes_logo.svg => kubernetes_logo.png 2016-05-25 09:08:53 +08:00
yeasy
280432204f Merge pull request #84 from ytgs/master
Minor fix terms and add more installation steps.
2016-04-18 11:52:43 +08:00
ytgs
6e5aeba187 Update install/debian.md 2016-04-17 22:01:33 +08:00
ytgs
1089796d49 Update install/debian.md 2016-04-17 21:42:43 +08:00
ytgs
7d4df6e369 Update install/README.md 2016-04-17 21:29:12 +08:00
ytgs
45b0402226 Update SUMMARY.md 2016-04-17 21:28:48 +08:00
ytgs
bebc4f646c Create install/debian.md 2016-04-17 21:28:47 +08:00
ytgs
c9555eb0f5 Update SUMMARY.md 2016-04-17 21:28:41 +08:00
ytgs
33bfa4c9dc Update install/ubuntu.md 2016-04-17 21:08:21 +08:00
ytgs
a6368a8091 Update install/ubuntu.md 2016-04-17 20:10:47 +08:00
ytgs
55712f7bdf Update basic_concept/repository.md 2016-04-17 19:34:35 +08:00
ytgs
316b45f11a Update basic_concept/repository.md 2016-04-17 19:12:49 +08:00
ytgs
2fceed22ac Update basic_concept/container.md 2016-04-17 19:08:31 +08:00
ytgs
5fa1b6024a Update basic_concept/image.md 2016-04-17 19:08:10 +08:00
yeasy
c50cfe14e0 Add new qq group number 2016-04-08 17:14:24 +08:00
yeasy
34fc4eee76 Merge pull request #81 from duSupport/master
fix typo
2016-03-01 09:59:44 +08:00
ds
3bd6083e68 更正 安装 -> Ubuntu -> 系统要求 中的错别字 2016-02-29 13:09:30 +08:00
yeasy
a6acd08bd0 Update the Centos installation 2016-02-04 15:08:44 +08:00
yeasy
6274d552d6 Update the ubuntu os installation 2016-02-04 14:29:05 +08:00
Baohua Yang
e2544bcb28 release 0.6 2015-12-24 09:44:47 +08:00
yeasy
121f498011 Merge pull request #80 from LcpMarvel/image_create_text
fix image building description on installing the json application
2015-12-21 09:27:45 +08:00
lcp
7d9625ec25 修正镜像创建中json应用描述 2015-12-19 12:13:18 +08:00
yeasy
3ca35d9638 Merge pull request #79 from GameXG/master
fix path error in compose example
2015-12-16 11:31:38 +08:00
GameXG
c71cf6a731 修正 compose 例子错误
数据卷相对路径必须以 . 或 .. 开头,否则会被认为是卷名称,由于存在 “/” 会提示:ERROR: haproxy/haproxy.cfg includes invalid characters for a local volume name, only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed 

参考来源:https://docs.docker.com/compose/compose-file/
You can mount a relative path on the host, which will expand relative to the directory of the Compose configuration file being used. Relative paths should always begin with . or ...
2015-11-26 22:41:28 +08:00
yeasy
062f008435 Merge pull request #77 from rhinoceros/master
Resolve apache2 install dependency error
2015-10-14 13:19:43 +08:00
rhinoceros.xn
6158dda40e Update case/supervisor.md : Resolve apache2 install error
Resolve error below:


Step 5 : RUN apt-get install -y openssh-server apache2 supervisor
 ---> Running in 816b405cf0d1
Reading package lists...
Building dependency tree...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 apache2 : Depends: apache2-mpm-worker (= 2.2.22-1ubuntu1) but it is not going to be installed or
                    apache2-mpm-prefork (= 2.2.22-1ubuntu1) but it is not going to be installed or
                    apache2-mpm-event (= 2.2.22-1ubuntu1) but it is not going to be installed or
                    apache2-mpm-itk (= 2.2.22-1ubuntu1) but it is not going to be installed
           Depends: apache2.2-common (= 2.2.22-1ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
The command '/bin/sh -c apt-get install -y openssh-server apache2 supervisor' returned a non-zero code: 100
2015-10-13 13:53:05 +08:00
yeasy
692db8b6a2 Merge pull request #76 from zhangbaitong/master
Add coreos cluster quickstart section
2015-09-28 17:41:00 +08:00
zhangbaitong
3291d4795f coreos cluster quickstart section 2015-09-28 17:33:45 +08:00
yeasy
bfecf409ea Merge pull request #75 from zhangbaitong/master
Add coreos tools intro section
2015-09-28 15:15:02 +08:00
zhangbaitong
eb32546e3c coreos tools intro section 2015-09-28 11:43:40 +08:00
yeasy
cd59aaf167 Merge pull request #73 from zhangbaitong/master
Add coreos intro section
2015-09-06 08:58:22 +08:00
zhangbaitong
6066e9cc5a coreos intro 2015-09-06 08:50:13 +08:00
yeasy
4d60922fa3 Merge pull request #72 from dayiguizhen/patch-4
use -d to boot contianer
2015-08-28 17:55:33 +08:00
dayiguizhen
14fddb18be Update usage.md
更改加入集群的参数命令
2015-08-26 13:24:48 +08:00
yeasy
0dfe3ebcce Merge pull request #71 from dayiguizhen/patch-3
Fix swarm starting missing flag
2015-08-25 13:57:10 +08:00
dayiguizhen
99df02f626 Update usage.md
修改swarm加入集群的参数
2015-08-25 13:53:02 +08:00
yeasy
0a4bd48a79 Merge pull request #70 from dayiguizhen/patch-2
Update the figure url
2015-08-25 10:36:36 +08:00
dayiguizhen
9956994b76 Update intro.md
修改图片的地址
2015-08-25 10:32:53 +08:00
yeasy
e564a7d4da Merge pull request #69 from ChaoMai/master
Fix issue #68: Add missing -d flag to run container in background
2015-08-18 10:20:46 +08:00
Chao Mai
950dadf54d Fix issue #68: 在5.2 守护状态运行中,命令错误 2015-08-18 10:07:45 +08:00
yeasy
a7d45c5a16 Merge pull request #67 from dayiguizhen/patch-1
Update daemon.md
2015-08-03 10:08:32 +08:00
dayiguizhen
a435453b80 Update daemon.md
docker run -d 的含义是在后台运行容器并且输出容器的ID(Run container in background and print container ID),而不是以守护态运行容器。
2015-08-02 15:43:04 +08:00
Baohua Yang
5ba3d7b007 Merge branch 'master' of github.com:yeasy/docker_practice 2015-07-16 15:35:13 +08:00
Baohua Yang
bace19fdc0 Add more details on docker machine 2015-07-16 15:34:54 +08:00
Baohua Yang
76d8382136 reformat 2015-07-16 14:26:47 +08:00
Baohua Yang
17ecc5d33d Replace compose logo with latest version 2015-07-16 14:26:23 +08:00
yeasy
8043983d75 Merge pull request #66 from dayiguizhen/patch-1
fix link with http prefix
2015-07-15 16:14:46 +08:00
dayiguizhen
28c1490fc6 如果是docker.com是打不开的
会转到下面这个链接。
https://github.com/yeasy/docker_practice/blob/master/docker.com
2015-07-15 16:11:46 +08:00
Baohua Yang
f633c14de3 Fix issue#64, duplicated words 2015-07-07 11:08:58 +08:00
yeasy
f026a1bee0 Merge pull request #62 from jzk/cleanup
add commands to cleanup unused containers and images
2015-07-05 10:37:31 +08:00
yeasy
e0d2d0997f Merge pull request #61 from jzk/datavolume
Data volume expression revise.
2015-07-05 10:36:04 +08:00
Zhenkai Jiang
60ec1bf62c add sections to cleanup unused containers and images 2015-07-03 16:52:47 +08:00
Zhenkai Jiang
977221c5d1 add an example to validate restored data from data volume container 2015-07-03 16:23:46 +08:00
Zhenkai Jiang
72144f1032 fix a few vague descriptions for data volumes containers and backup/restore 2015-07-03 16:19:51 +08:00
Zhenkai Jiang
62aa90a3bf add/correct lifecycle information for data volumes 2015-07-03 16:17:28 +08:00
Baohua Yang
94c15606b3 Add mesos framework 2015-06-30 17:11:45 +08:00
Baohua Yang
215a5dec0b Add mesos chapter 2015-06-29 18:20:31 +08:00
Baohua Yang
2a6620036f Add the architecture design for k8s 2015-06-08 11:19:52 +08:00
Baohua Yang
c5a5656220 Refine the kubernetes chapter's structure 2015-06-08 10:51:42 +08:00
Baohua Yang
0e87b70fbf Add the section of kubectl, to be filled 2015-06-08 10:32:13 +08:00
Baohua Yang
03b1d1ffc0 Add the kubernetes quickstart 2015-06-08 10:26:08 +08:00
yeasy
eb6683fbd7 Merge pull request #60 from maguowei/master
format the expression
2015-06-07 22:36:02 +08:00
maguowei
345b0703a3 format text 2015-06-07 21:27:32 +08:00
Baohua Yang
7f4e4145b0 Fix content formatting and typos 2015-05-21 20:23:53 +08:00
Baohua Yang
c814568560 Split out the swarm scheduling and filter sections 2015-05-21 19:57:58 +08:00
yeasy
4cb1252a98 Merge pull request #59 from rio-2607/rio-docker-practice
Add the content for the docker-swarm project
2015-05-21 19:47:41 +08:00
rio-2607
a2231978ab Update usage.md 2015-05-21 19:36:59 +08:00
rio-2607
a3ca178621 Update usage.md 2015-05-20 21:56:41 +08:00
rio-2607
0b607e92a2 Update usage.md 2015-05-20 20:48:11 +08:00
rio-2607
29fcb84407 Update usage.md 2015-05-20 20:44:19 +08:00
rio-2607
d457323780 Update usage.md 2015-05-19 21:32:15 +08:00
rio-2607
f9c545dbfc update usage.md 2015-05-19 19:58:04 +08:00
rio-2607
ed893bea7e update intro.md 2015-05-18 21:24:13 +08:00
rio-2607
295b7cdb7f Update install.md 2015-05-18 20:24:14 +08:00
rio-2607
e4e3cca8d3 update install.md 2015-05-18 20:23:38 +08:00
yeasy
34a3c29865 Merge pull request #58 from UncleBarney/patch-1
Correct supervisor container name
2015-05-14 19:48:23 +08:00
Hechen Gao
b30d4a2328 Correct supervisor container name
The name of the container for configured supervisord container is incorrect.
It was: test/supervisords, while in the build step, we tagged it as test/supervisor.
2015-05-13 15:38:49 -07:00
Baohua Yang
5f59530d4c Add compose quick start example 2015-05-11 14:46:51 +08:00
Baohua Yang
52a1755ce7 Add more options for compose yaml file 2015-05-10 14:56:05 +08:00
Baohua Yang
547ebe6053 Start the swarm chapter 2015-05-08 20:10:44 +08:00
Baohua Yang
fdeeaba0b0 Start the machine chapter 2015-05-08 20:10:34 +08:00
Baohua Yang
8626d13738 Add the compose chapter 2015-05-08 20:10:01 +08:00
yeasy
36127abed9 Merge pull request #57 from milhu/patch-1
Update .bashrc_docker for CentOS usage
2015-05-08 13:12:28 +08:00
milhu
8e976258b5 Update .bashrc_docker for CentOS usage
resolve invalid option error and able to find nsenter automatically if it has been installed with path notified
2015-05-08 11:21:02 +08:00
Baohua Yang
1d864385af Change version number to 0.4 2015-05-08 10:47:47 +08:00
yeasy
068e2e948b Merge pull request #56 from tekkamanninja/tekkaman_fix
Fix typo in container/import_export.md:
2015-05-04 11:21:25 +08:00
Fu Wei
d61a0b7677 Fix typo in container/import_export.md:
test/buntu:v1.0 to test/ubuntu:v1.0
2015-04-27 15:46:37 +08:00
yeasy
da6bb5f174 Merge pull request #51 from custa/master
Fix typos and expression format.
2015-03-15 19:17:40 +08:00
custa
fd92e6e343 Update tomcat.md
排版错误
2015-03-12 16:36:11 +08:00
custa
39cb5ffa88 放到
错别字: 方到 -> 放到
2015-03-12 16:18:35 +08:00
custa
b66e84fb84 Update supervisor.md
### 安装 ssh、apache 和 supervisor
2015-03-12 16:17:18 +08:00
Baohua Yang
72f6c252be Remove useless files 2015-03-12 13:41:02 +08:00
Baohua Yang
1b576a7e2a Add the kubernetes chapter into summary 2015-03-12 13:32:39 +08:00
yeasy
dee055b261 Merge pull request #50 from custa/master
修改错别字:容器卷->数据卷
2015-03-12 13:22:58 +08:00
custa
9df06628d2 Update linking.md 2015-03-11 09:52:45 +08:00
custa
c1844c1345 Update container.md 2015-03-11 09:48:35 +08:00
waitfish
53b75686d7 Change QQ 2015-02-28 16:11:54 +08:00
yeasy
d43fefff44 Merge pull request #48 from weilaihui/master
kubernetes写到第二节
2015-02-26 20:54:38 +08:00
yeasy
d4b2e6bee8 Merge pull request #47 from you-n-g/master
Fix simple typo
2015-02-26 20:53:41 +08:00
xiaolinzi
2fc168142c 复制控制器 2015-02-26 18:16:08 +08:00
xiaolinzi
c06250ee20 kubernetes写到第二节 2015-02-26 18:16:08 +08:00
xiaolinzi
815aca0279 readme done 2015-02-26 18:16:08 +08:00
xiaolin
1c194b4738 test 2015-02-26 18:16:08 +08:00
Young Yang
6b1a7e5028 simple typo 2015-02-23 10:25:27 +08:00
yeasy
939af1884a Merge pull request #46 from you-n-g/master
just a simple type error
2015-02-21 13:21:04 +08:00
Young Yang
76fcc36ac9 just a simple type error 2015-02-12 22:48:10 +08:00
yeasy
6fb92461c4 Merge pull request #45 from zhangbaitong/master
fix url format
2015-02-12 14:01:32 +08:00
zhangbaitong
86a4b061b0 fix url format 2015-02-12 13:42:06 +08:00
yeasy
cba7c8017e Merge pull request #44 from zhangbaitong/master
fix url format
2015-02-12 12:04:46 +08:00
zhangbaitong
b7ed0ab7a4 fix url format 2015-02-12 11:56:29 +08:00
yeasy
7a87084d71 Update README.md
v0.3.4
2015-02-03 13:48:47 +08:00
yeasy
6375778e23 Merge pull request #41 from zhangbaitong/master
add CoreOS section
2015-01-31 12:56:18 +08:00
zhangbaitong
bf63c11c05 add coreos section 2015-01-31 12:47:27 +08:00
zhangbaitong
7cd6a94dc4 add coreos section 2015-01-31 12:43:20 +08:00
yeasy
b445841df7 Merge pull request #40 from copuzzle/master
Fix expression words.
2015-01-22 10:30:32 +08:00
copuzzle
fa9d217607 修改一些小细节 2015-01-21 22:20:03 +08:00
copuzzle
60d1e6f20d Merge branch 'master' of https://github.com/yeasy/docker_practice 2015-01-21 21:42:01 +08:00
yeasy
340af53f10 Merge pull request #39 from stamhe/master
Fix typos.
2015-01-20 19:34:33 +08:00
Stam He
4fff004b97 修改笔误 2015-01-20 15:26:33 +08:00
copuzzle
7ea165b3b4 暴漏 to 暴露 2015-01-15 20:47:16 +08:00
yeasy
842a81eb1c Merge pull request #38 from zhangbaitong/master
finished fig env ref
2015-01-15 10:25:48 +08:00
zhangbaitong
ff130ef077 finished fig env ref 2015-01-15 10:18:12 +08:00
zhangbaitong
57f53c031b finished fig env ref 2015-01-15 10:17:25 +08:00
yeasy
92925d2cb3 Merge pull request #37 from zhangbaitong/master
finished fig.yml ref
2015-01-15 08:37:59 +08:00
zhangbaitong
b424142791 finished fig.yml ref 2015-01-14 23:26:04 +08:00
zhangbaitong
8d40f74532 finished fig.yml ref 2015-01-14 23:22:04 +08:00
yeasy
285d69275a Merge pull request #35 from zhangbaitong/master
fix url address
2015-01-14 23:08:27 +08:00
zhangbaitong
34282977af use right format of md 2015-01-14 22:48:33 +08:00
zhangbaitong
42ca51db65 use right format of md 2015-01-14 22:45:59 +08:00
Baohua Yang
dd02308d91 Update summary to add recent content 2015-01-14 22:45:23 +08:00
yeasy
2da8779e68 Merge pull request #36 from copuzzle/master
Finish django rails wordpress chapters
2015-01-14 22:38:43 +08:00
copuzzle
e8607564a4 finished wordpress 2015-01-14 21:52:19 +08:00
copuzzle
753130f571 add wordpress content 2015-01-14 14:09:38 +08:00
copuzzle
9c5053b89c finished rails basicly 2015-01-14 13:46:21 +08:00
copuzzle
1cbd9645fc 修改句子 2015-01-14 10:51:02 +08:00
copuzzle
d473dabd78 finished django,add ml_ref.md 2015-01-14 10:03:47 +08:00
zhangbaitong
b0a61fb009 修改错别字 2015-01-14 09:29:16 +08:00
zhangbaitong
6f3898ae6b fix url address 2015-01-14 09:05:41 +08:00
copuzzle
7ccfec3f3b add django rails file and other images 2015-01-13 18:04:53 +08:00
yeasy
63264c623c Merge pull request #34 from zhangbaitong/master
update summary for fig cli chapter
2015-01-13 16:20:00 +08:00
zhangbaitong
8261449e42 update fig cli ref doc 2015-01-13 16:13:30 +08:00
yeasy
9a6bc4a1aa Merge pull request #33 from zhangbaitong/master
补充句子中遗留的命令
2015-01-13 16:10:22 +08:00
zhangbaitong
42785a15a7 add fig cli ref doc 2015-01-13 16:05:00 +08:00
zhangbaitong
d044ff923a 修改格式 2015-01-12 10:16:14 +08:00
zhangbaitong
e55429f64f 补充句子中遗留的命令 2015-01-11 21:47:22 +08:00
yeasy
69e0cc2c26 Merge pull request #30 from zhangbaitong/master
修改fig章节表述内容
2015-01-11 19:40:07 +08:00
zhangbaitong
94d7e664c3 修改内容表述问题 2015-01-07 15:55:00 +08:00
zhangbaitong
14cad7881f 修改错误表述内容 2015-01-07 14:03:12 +08:00
Baohua Yang
a93f3b4d2a Add the fig chapter into summary 2015-01-04 18:19:38 +08:00
yeasy
c5fd5f025c Merge pull request #29 from copuzzle/master
Fig 文档翻译, 简介,首页,安装章节
2015-01-04 17:57:06 +08:00
copuzzle
f80eed0e18 fix char 2015-01-01 22:21:30 +08:00
copuzzle
d2bbf9e4ca fix error char 2015-01-01 22:17:39 +08:00
copuzzle
544ee1de65 finish install section 2015-01-01 22:12:28 +08:00
copuzzle
8956a6b120 Merge branch 'master' of https://github.com/yeasy/docker_practice 2015-01-01 21:23:55 +08:00
copuzzle
36b6e29d59 add readme content
fix warring tag css
2015-01-01 21:21:33 +08:00
copuzzle
fbe187a743 fix image problem 2015-01-01 12:16:46 +08:00
Baohua Yang
971023ddca Minor change words 2014-12-31 18:32:46 +08:00
Baohua Yang
a977601251 Update version info in the preface content 2014-12-31 17:20:26 +08:00
Baohua Yang
589148450f Add etcd chapter 2014-12-31 17:11:09 +08:00
Baohua Yang
29b7568853 Start v0.4 writing, minor fix preface content 2014-12-31 10:08:27 +08:00
copuzzle
69d10ac09d fix som problem 2014-12-30 23:57:43 +08:00
copuzzle
c0dbca7a93 finish home page translate 2014-12-30 23:44:09 +08:00
copuzzle
dd24811386 add fig doc part 2014-12-30 14:46:50 +08:00
Baohua Yang
2392ba87ea Add links to china-pub 2014-12-22 09:47:00 +08:00
Baohua Yang
d4d430a99e Fix issue #28: maintainer information 2014-12-21 19:27:46 +08:00
Baohua Yang
201a2180a3 Merge branch 'master' of github.com:yeasy/docker_practice 2014-12-21 19:24:45 +08:00
Baohua Yang
070359c511 Refine the preface content 2014-12-21 19:24:20 +08:00
yeasy
7876ec1485 Merge pull request #27 from gaojice/master
试试如何贡献
2014-12-14 11:41:05 +08:00
gaojice
f945d9f209 试试如何贡献 2014-12-13 00:16:10 +08:00
Baohua Yang
9215e4b88e Publish v0.3 version 2014-11-25 13:38:43 +08:00
Baohua Yang
e5a297a7be Update ignore type list 2014-11-07 15:42:25 +08:00
Baohua Yang
34dc895942 Merge branch 'master' of github.com:yeasy/docker_practice 2014-11-07 15:27:30 +08:00
yeasy
d858b810be Merge pull request #22 from yougg/patch-1
修改部分错别字及描述信息
2014-11-06 20:34:49 +08:00
yougg
76b6a51f57 修改标点符号 2014-11-06 10:58:28 +08:00
yougg
6af4bdd1d1 修改错别字 2014-11-06 10:41:26 +08:00
yougg
8a7c23ce01 添加URL链接 2014-11-06 10:32:09 +08:00
yougg
089533127f 修改错别字 2014-11-06 10:28:19 +08:00
yougg
d0297f8da6 修改错别字 2014-11-06 10:19:56 +08:00
yougg
fb3ba14bdf 删除多余字 2014-11-06 10:16:10 +08:00
yougg
f9bdf3fe89 修改语句描述 2014-11-06 10:00:36 +08:00
yougg
6e9dea1ffe 修改"虚拟机"为"容器" 2014-11-06 09:47:21 +08:00
yougg
d7c88f7972 添加标题标记 2014-11-06 09:14:51 +08:00
yougg
05eb51961d 添加遗漏字 2014-11-06 09:06:49 +08:00
yougg
5fc06666c8 修改错别字 2014-11-05 17:37:37 +08:00
yougg
af2a0b28c5 修改语句描述
修改语句描述
2014-11-05 12:47:29 +08:00
Baohua Yang
fda6a07a1e Minor update ignore file; Add pull_all and push_all scripts 2014-10-30 15:30:51 +08:00
yeasy
f936efebd9 Update push_images.sh 2014-10-26 15:36:52 +08:00
Baohua Yang
16527880fb minor fix space; delete useless file 2014-10-21 13:59:03 +08:00
Baohua Yang
cb903202ba Fix issue#20, format following the guidelines 2014-10-14 13:25:01 +08:00
Baohua Yang
9d26f96ba2 Merge branch 'master' of github.com:yeasy/docker_practice 2014-10-12 10:32:14 +08:00
Baohua Yang
ed7c2a3ee7 User new dockerpool repo server address 2014-10-12 10:32:04 +08:00
Baohua Yang
894d8ebc62 Merge pull request #19 from luashiping/master
fix expose
2014-10-11 16:35:58 +08:00
lushiping
46195eb9f6 fix expose 2014-10-11 16:18:19 +08:00
Baohua Yang
d732713b06 Add dockerfile chapter 2014-10-10 17:30:53 +08:00
Baohua Yang
4e70438202 Rename the network chapter 2014-10-10 09:37:52 +08:00
Baohua Yang
5a642809d9 Minor changes on content 2014-10-10 09:37:15 +08:00
Baohua Yang
06b9651af9 Add more details to help understand repo and registry 2014-10-03 11:41:22 +08:00
Baohua Yang
8117a15804 Add comparison summary with vm 2014-10-03 11:34:57 +08:00
Baohua Yang
c48aa47432 minor change, add dockerpool link 2014-09-30 13:39:19 +08:00
Baohua Yang
d897954e8a Merge pull request #18 from patriot7/master
fix typo
2014-09-30 12:51:49 +08:00
Gao Xiang
1a6861476b fix typo 2014-09-29 17:36:46 -04:00
Baohua Yang
6fa5159bb9 Add new chapters to introduce the popular repositories 2014-09-27 16:06:08 +08:00
Baohua Yang
1faf0eeba6 rename the appendix chapter's directories 2014-09-27 13:26:40 +08:00
Baohua Yang
24191c2ebe Modify the import of bash file 2014-09-26 20:33:00 +08:00
Baohua Yang
e94bb1d13b Modify the usage of the bashrc file 2014-09-26 17:52:04 +08:00
Baohua Yang
7896cb5d7b Add more useful command 2014-09-26 17:46:05 +08:00
Baohua Yang
d4b8630bca Rewrite the introduction and minor fix 2014-09-26 17:45:51 +08:00
Baohua Yang
8857c11fa6 minor change to expression; unify the term and formatting 2014-09-26 16:05:13 +08:00
Baohua Yang
8add83dcc2 restruct the chapter to make it more understanding 2014-09-26 15:44:31 +08:00
Baohua Yang
6d890cab80 Note to start docker in ubuntu installation 2014-09-26 14:34:16 +08:00
Baohua Yang
0505622aeb Reformat the installation chapter 2014-09-26 14:14:13 +08:00
Baohua Yang
25c95840bf review the content 2014-09-26 14:08:26 +08:00
Baohua Yang
4098af51bc Update link to file directly 2014-09-25 22:09:04 +08:00
Baohua Yang
17ab6bcd7b Rewrite and add more details on attach and nsenter; add bashrc_docker file 2014-09-25 22:08:45 +08:00
Baohua Yang
73b5e3890e restruct and add brief introduction part 2014-09-25 17:23:05 +08:00
Baohua Yang
4901436e6b Use Docker instead of docker 2014-09-25 17:06:32 +08:00
Baohua Yang
37e650575f Merge pull request #17 from luashiping/master
add enter container
2014-09-25 16:55:53 +08:00
Baohua Yang
3d8dd3175f Add the repo configuration section 2014-09-25 16:46:37 +08:00
Baohua Yang
56fc8fd280 use -d to start container as daemon 2014-09-25 16:45:47 +08:00
Baohua Yang
d77c41dab7 Add contribution list 2014-09-25 16:45:03 +08:00
lushiping
5912b8fb00 add enter container 2014-09-25 16:09:50 +08:00
lushiping
929caa27e8 add enter container 2014-09-25 15:51:25 +08:00
lushiping
18507f9eaf Fix issue #1: change helo to hello 2014-09-25 15:42:21 +08:00
lushiping
ed6e476e94 Fix issue #1: change helo to hello 2014-09-25 15:31:18 +08:00
Baohua Yang
2422e4e19d Merge pull request #16 from hsgui/master
upstream without https:// could not work
2014-09-24 17:01:16 +08:00
hsgui
ec4e36bbf4 upstream without https:// could not work 2014-09-24 15:55:37 +08:00
Baohua Yang
ae67944ddf Merge pull request #15 from hsgui/master
Fix: change --volumne--from to --volumnes-from
2014-09-24 13:35:56 +08:00
Baohua Yang
cab41b6362 Merge pull request #14 from aisensiy/master
在 Image 章节发现的两个小错误
2014-09-24 13:34:52 +08:00
hsgui
10b432ab65 Fix: change --volumne--from to --volumnes-from 2014-09-24 13:10:32 +08:00
aisensiy
08ed01831a docker save is used to save image and docker export is used to export container 2014-09-24 12:27:00 +08:00
aisensiy
26620cb3d5 mysqld to httpd 2014-09-24 12:07:25 +08:00
Baohua Yang
a9825f93e9 Update local repo usage, add a batch script to upload local images 2014-09-24 11:03:46 +08:00
Baohua Yang
86f8095149 Add more examples on using local repo 2014-09-23 16:40:54 +08:00
Baohua Yang
ff245474dc Add the backup repo server 2014-09-23 15:07:38 +08:00
Baohua Yang
cef1322014 Fix issue#12, cmd should be run with root privilege 2014-09-23 13:45:50 +08:00
Baohua Yang
b5d4a05d4b Add more details to use the local repo 2014-09-23 13:14:45 +08:00
Baohua Yang
876ea4c9d6 Add more accurate link 2014-09-22 16:43:23 +08:00
Baohua Yang
9fd703bc18 Add change log 2014-09-22 16:43:05 +08:00
Baohua Yang
2a60b4ce7e Remove the local repo case, add its content into the image and repository sections 2014-09-22 16:40:18 +08:00
Baohua Yang
71bcec05b7 Rewrite the local repo deployment case 2014-09-22 15:52:53 +08:00
Baohua Yang
ed2750776a Rewrite the other security feature part and security summary part 2014-09-22 11:19:52 +08:00
Baohua Yang
07edb7e3c1 Update the term to better meaning 2014-09-22 10:56:15 +08:00
Baohua Yang
3e9f1343f0 Merge branch 'cxjava-master' 2014-09-22 10:05:24 +08:00
Baohua Yang
71f0f50f27 Merge branch 'master' of https://github.com/cxjava/docker_practice into cxjava-master
Conflicts:
	security/control_group.md
	security/daemon_sec.md
	security/kernel_capability.md
	security/kernel_ns.md
2014-09-22 10:04:22 +08:00
Baohua Yang
909dfb8e12 Merge branch 'master' of github.com:yeasy/docker_practice 2014-09-22 09:49:10 +08:00
Baohua Yang
554224406b Change section title 2014-09-22 09:47:08 +08:00
Baohua Yang
ca451d866f Merge pull request #10 from bill2004158/master
fix link url
2014-09-22 09:45:33 +08:00
bill2004158
eb203c80d5 fix link url 2014-09-22 00:43:50 +08:00
Baohua Yang
59abd4883d rewrite the kernel capability part 2014-09-21 22:07:06 +08:00
Baohua Yang
8c59d79c5b rewrite the daemon part 2014-09-21 21:44:55 +08:00
Baohua Yang
467edbe130 rewrite the control group part 2014-09-21 21:33:51 +08:00
Baohua Yang
64ed80de0d rewrite the kernel security part 2014-09-21 21:33:30 +08:00
Baohua Yang
ece126aa1b rewrite the introduction of docker security 2014-09-21 21:33:06 +08:00
Baohua Yang
337065434d Add cover pages 2014-09-21 21:32:42 +08:00
Baohua Yang
c5b81e3330 Add the book.json file 2014-09-21 21:32:13 +08:00
Charles
2a21c2f595 Merge branch 'master' of github.com:cxjava/docker_practice 2014-09-21 20:51:13 +08:00
Charles
96b199aae2 Fixed the wrong Chinese character 2 2014-09-21 20:50:55 +08:00
Charles
5d00f5476b Fixed the wrong Chinese character 2014-09-21 20:48:49 +08:00
Charles
39ef881ace Fixed the wrong Chinese character 2014-09-21 20:27:40 +08:00
Baohua Yang
672316dfb5 Change read link address to the front page 2014-09-21 18:19:09 +08:00
Baohua Yang
f0eb7ac601 restruct and publish new version 0.2.1 2014-09-21 13:58:23 +08:00
Baohua Yang
7f31be0ed9 rename 2014-09-21 13:51:26 +08:00
Baohua Yang
49c4143e27 rename 2014-09-21 13:50:34 +08:00
Baohua Yang
c184f014ae Merge pull request #8 from windwiny/patch-1
Update tomcat.md
2014-09-21 13:46:52 +08:00
Baohua Yang
7b0e52f309 Write the underly/network chapter 2014-09-21 13:40:10 +08:00
windwiny
aa3ff4dc6a Update tomcat.md 2014-09-21 11:47:56 +08:00
Baohua Yang
d544c2949f Update the instruction with latest official document 2014-09-20 21:50:27 +08:00
Baohua Yang
b94178ee16 Merge pull request #7 from kmiku7/master
Fix install commands on CentOS
2014-09-20 21:44:18 +08:00
kmiku7
4567e7e6f7 Fix install commands on CentOS 2014-09-21 02:15:13 +08:00
Baohua Yang
f4dc2303f6 Fix issue#6: clarify the differences between image:save,load and container:export,import 2014-09-19 21:51:21 +08:00
Baohua Yang
8dffa923bc minor revision; update link 2014-09-19 11:23:25 +08:00
Baohua Yang
2b40097e66 Add guide on how to participate the project 2014-09-18 22:13:12 +08:00
Baohua Yang
0e65e07e3d Add the section of network config file 2014-09-18 17:38:42 +08:00
Baohua Yang
23d4e36c64 rewrite the advanced network chapter 2014-09-18 17:38:20 +08:00
Baohua Yang
424e07993e Change to more accurate expression 2014-09-18 15:55:24 +08:00
Baohua Yang
a3d8341e27 rewrite the fast_config and dns part of the advanced network chapter 2014-09-18 14:09:51 +08:00
Baohua Yang
0d48072d5c rewrite the introduction of advanced network chapter; redraw the figure 2014-09-18 13:07:31 +08:00
Baohua Yang
b1e6415b8f Finish the basic content for the underly chapter 2014-09-18 10:45:17 +08:00
Baohua Yang
d83e318b8c reduce the technical part 2014-09-18 10:34:52 +08:00
Baohua Yang
1065a728ce minor fix 2014-09-17 23:25:32 +08:00
Baohua Yang
1ac18858b5 restruct and add more content to introduce cgroups, ufs and container format 2014-09-17 20:53:14 +08:00
Baohua Yang
99f9a77b3c fix link info 2014-09-17 20:30:06 +08:00
Baohua Yang
b20eb11659 Add more detailed comments 2014-09-17 20:26:35 +08:00
Baohua Yang
6c1eeadd14 write the repository chapter content 2014-09-17 20:18:51 +08:00
Baohua Yang
faacf4c31d fix formatting and content 2014-09-17 19:42:22 +08:00
Baohua Yang
beb5a07855 change terminology 2014-09-17 19:36:51 +08:00
Baohua Yang
edbc260ba9 Merge branch 'master' of github.com:yeasy/docker_practice
Conflicts:
	practice/supervisor.md
2014-09-17 19:33:05 +08:00
Baohua Yang
7fda9225a1 fix code formatting and rewrite part content 2014-09-17 19:23:52 +08:00
Baohua Yang
2b90922922 Merge pull request #3 from dreampuf/patch-1
Fix a code block issue
2014-09-17 19:23:20 +08:00
Baohua Yang
cdb5a2b4c7 Merge pull request #2 from liangry/master
Fix permission denied error in ubuntu installation
2014-09-17 19:20:54 +08:00
Baohua Yang
22afe36b0f fix the terminologies, add more content 2014-09-17 16:31:25 +08:00
Dreampuf
2403f6e73d Fix codeblock issue 2014-09-17 16:22:47 +08:00
Dreampuf
4ad69eb796 Fix a codeblock issue 2014-09-17 16:21:41 +08:00
Baohua Yang
7f5c1acf09 refine the expression 2014-09-17 16:14:22 +08:00
Baohua Yang
a228773062 Add the original manual file by waitfish 2014-09-17 15:59:23 +08:00
Dreampuf
910786014e Fix a code block issue 2014-09-17 15:14:33 +08:00
Baohua Yang
4abab290ac Add .idea and _book directories into gitignore file 2014-09-17 14:59:13 +08:00
Baohua Yang
389c15d748 rename images directory to _images 2014-09-17 14:52:55 +08:00
Baohua Yang
c50e2aaf60 change the struct of image chapter, add export/import and join the docker hub related operations together 2014-09-17 14:33:06 +08:00
Baohua Yang
615bb9f517 Add more content 2014-09-17 14:16:45 +08:00
Ruoyu
c057d68cec Fix permission denied error in ubuntu installation 2014-09-17 14:16:08 +08:00
Baohua Yang
3ec888c77a Based on pull request#1, change the figure name suffix 2014-09-17 14:14:58 +08:00
Baohua Yang
99b0f8fe72 Fix terms 2014-09-17 13:45:13 +08:00
Baohua Yang
34d63d30f3 Rewrite the data_management chapter 2014-09-16 13:31:53 +08:00
Baohua Yang
dbb12986da Add more information on the discuss group 2014-09-16 10:26:19 +08:00
Baohua Yang
64a0f39dff rewrite the container, network chapters 2014-09-15 22:30:23 +08:00
Baohua Yang
da60ad7b47 Add image/list.md and dockerfile chapter 2014-09-15 21:51:21 +08:00
Baohua Yang
2c939cf20f Fix word in image chapter 2014-09-15 21:28:09 +08:00
Baohua Yang
e91a4955e9 Add the container chapter 2014-09-15 21:25:36 +08:00
Baohua Yang
fc7aa02f50 Finish the basic version of the basic_concept chapter 2014-09-15 17:36:31 +08:00
Baohua Yang
813c3bdab1 Add two chapters:container and repository 2014-09-15 17:11:22 +08:00
Baohua Yang
80eda65481 Restruct and start rewring. 2014-09-15 17:08:06 +08:00
Baohua Yang
f14fddbba8 minor fix 2014-09-14 14:04:30 +08:00
Baohua Yang
a9dddd5bc1 Add resources chapter 2014-09-14 14:01:26 +08:00
Baohua Yang
68e02605f6 Add more commands in creating an image 2014-09-14 13:57:19 +08:00
Baohua Yang
743a09086a Add cover figure 2014-09-12 20:34:15 +08:00
Baohua Yang
e6986e387e minor change 2014-09-12 16:18:48 +08:00
Baohua Yang
71adb73dbb Rewrite the content 2014-09-12 16:18:24 +08:00
Baohua Yang
e6883a4ef2 Refine and fix 2014-09-12 16:17:56 +08:00
Baohua Yang
7fc1ca0733 split the installation to two main distributions 2014-09-12 15:37:21 +08:00
Baohua Yang
79934ad3e1 Add figure for the command logic 2014-09-12 15:36:41 +08:00
Baohua Yang
0258da9046 fix wrong link name 2014-09-12 11:01:57 +08:00
Baohua Yang
e0405a38d6 rename the first chapter 2014-09-12 10:52:17 +08:00
Baohua Yang
afa47edf45 Add docker command page 2014-09-12 10:51:47 +08:00
Baohua Yang
f5ab41b2fa Add new chapters: the docker command 2014-09-11 22:52:57 +08:00
Baohua Yang
1d101330fd express refine 2014-09-11 22:52:28 +08:00
Baohua Yang
1f5fb2d521 Rewrite part of the architecture introduction 2014-09-11 17:07:49 +08:00
Baohua Yang
235a80aad8 Write paragraphs to explain why we need docker; minor grammar fix. 2014-09-11 16:56:34 +08:00
351 changed files with 13679 additions and 1160 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
-->

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

@@ -0,0 +1,69 @@
name: Check link
on:
# push:
# pull_request:
workflow_dispatch:
jobs:
check-link:
name: check-link
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 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

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

@@ -0,0 +1,159 @@
on:
push:
pull_request:
workflow_dispatch:
name: CI
defaults:
run:
shell: bash --noprofile --norc -exo pipefail {0}
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 2
- 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: |
sudo rm -rf _book
# npm i vuepress --save-dev
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.docker-practice.com" > .vuepress/dist/CNAME
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}}

12
.gitignore vendored
View File

@@ -1,3 +1,13 @@
# Created by .gitignore support plugin (hsz.mobi)
*.~
*.tmp
*.tmp
.idea/
_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) 规范。

View File

@@ -1,19 +1,73 @@
Docker -- 从入门到实践
===============
# Docker 从入门到实践
v0.1
[![](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] (docker.com)是个伟大的项目
**v1.3.0**
本书最初源于[WaitFish](mailto:dwj_wz@163.com)
创作的<Docker学习手册v1.0> pdf内容后来[yeasy](github.com/yeasy)
根据最新的官方文档对内容进行了修订并与作者[WaitFish]
(mailto:dwj_wz@163
.com)协商将内容开源采用互联网合作的方式进行创作和维护
| 语言 | - |
| :------------- | :--- |
| [简体中文](https://github.com/yeasy/docker_practice) | [阅读](https://vuepress.mirror.docker-practice.com/) |
在线阅读[https://www.gitbook.io/book/yeasy/docker_practice](https://www.gitbook.io/book/yeasy/docker_practice)
[Docker](https://www.docker.com) 是个划时代的开源项目,它彻底释放了计算虚拟化的威力,极大提高了应用的维护效率,降低了云计算应用开发的成本!使用 Docker可以让应用的部署、测试和分发都变得前所未有的高效和轻松
维护本书的Github项目: [https://github.com/yeasy/docker_practice](https://github
.com/yeasy/docker_practice)
无论是应用开发者运维人员还是其他信息技术从业人员都有必要认识和掌握 Docker节约有限的生命
欢迎大家提交pull request
本书既适用于具备基础 Linux 知识的 Docker 初学者也希望可供理解原理和实现的高级用户参考同时书中给出的实践案例可供在进行实际部署时借鉴前六章为基础内容供用户理解 Docker 的基本概念和操作7 ~ 9 章介绍包括数据管理网络等高级操作 10 ~ 12 章介绍了容器生态中的几个核心项目1314 章讨论了关于 Docker 安全和实现技术等高级话题后续章节则分别介绍包括 EtcdFedora CoreOSKubernetes容器云等相关热门开源项目最后还展示了使用容器技术的典型的应用场景和实践案例
* 在线阅读[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 自身仍在快速发展中生态环境也在蓬勃成长建议初学者使用最新稳定版本的 Docker 进行学习实践欢迎 [参与项目维护](CONTRIBUTING.md)
* [修订记录](CHANGELOG.md)
* [贡献者名单](https://github.com/yeasy/docker_practice/graphs/contributors)
## 微信小程序
<p align="center">
<img width="200" src="https://docker_practice.gitee.io/pic/dp-wechat-miniprogram.jpg">
</p>
<p align="center"><strong>微信扫码 随时随地阅读~</strong></p>
## 技术交流
<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,53 +1,171 @@
#目录
* [为什么要使用docker](why_use_docker/README.md)
- [快速交付应用程序](why_use_docker/fast_deployment.md)
- [更容易部署和扩展](why_use_docker/easy_deployment.md)
- [效率更高](why_use_docker/high_efficiency.md)
- [快速部署也意味着更简单的管理](why_use_docker/easy_management.md)
* [Docker的体系结构](arch/README.md)
- [内部组件](arch/internal.md)
- [image的工作原理](arch/image.md)
- [仓库](arch/repo.md)
- [容器](arch/container.md)
- [底层技术](arch/underly.md)
* [安装](install/README.md)
- [Ubuntu 14.04](install/ubuntu144.md)
- [Ubuntu 12.04](install/ubuntu124.md)
- [CentOS](install/centos.md)
* [image介绍](image/README.md)
- [获取mage](image/get.md)
- [查找image](image/search.md)
- [下载image](image/download.md)
- [创建自己的image](image/create.md)
- [上传image](image/push.md)
- [移除本地image](image/rmi.md)
* [网络介绍](network/README.md)
- [端口映射](network/port_mapping.md)
- [docker中的容器互联-linking系统](network/linking.md)
* [高级网络配置](advanced_network/README.md)
- [快速配置](advanced_network/fast_config.md)
- [配置DNS](advanced_network/dns.md)
- [容器之间的通信](advanced_network/communication.md)
- [映射一个容器端口到宿主主机](advanced_network/port_mapping.md)
- [定制docker0](advanced_network/docker0.md)
- [创建自己的桥接](advanced_network/bridge.md)
- [Docker 如何连接到容器](advanced_network/how_connect.md)
- [工具和示例](advanced_network/example.md)
- [创建一个点到点连接](advanced_network/ptp.md)
# [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)
* [基本概念](basic_concept/README.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)
* [容器安全](container_security/README.md)
- [内核名字空间](container_security/kernel_ns.md)
- [控制组](container_security/control_group.md)
- [守护进程安全](container_security/daemon_sec.md)
- [内核权限](container_security/kernel_capability.md)
- [其他内核安全特性](container_security/other_feature.md)
- [结论](container_security/summary.md)
* [实战案例](practice/README.md)
- [部署本地仓库](practice/local_repo.md)
- [在Docker中使用 Supervisor来管理进程](practice/supervisor.md)
* [创建tomcat/weblogic集群](practice/tomcat.md)
* [多台物理主机之间的容器互联](practice/container_connect.md)
* [中小企业docker环境搭建](practice/environment.md)
* [数据卷](data_management/volume.md)
* [挂载主机目录](data_management/bind-mounts.md)
* [使用网络](network/README.md)
* [外部访问容器](network/port_mapping.md)
* [容器互联](network/linking.md)
* [配置 DNS](network/dns.md)
* [高级网络配置](advanced_network/README.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)
* [实例创建一个点到点连接](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)
* [底层实现](underly/README.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)
* [集群](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]

BIN
_images/cover.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

BIN
_images/cover.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
_images/cover.sketch Normal file

Binary file not shown.

BIN
_images/cover_small.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
_images/docker_primer.png Normal file

Binary file not shown.

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

View File

@@ -1,9 +1,15 @@
#docker高级网络配置
当docker启动时会在主机上创建一个docker0的虚拟网卡他随机挑选RFC1918私有网络中的一段地址给docker0比如172.17.42.1/16,16位掩码的网段可以拥有65534个地址可以使用这对主机和容器来说应该足够了
注意本章介绍docker的高级网络配置一般情况下你不需要知道这些也可以使docker正常工作简单的网络配置和介绍请看第五章内容
docker0 不是普通的网卡他是桥接到其他网卡的虚拟网卡容器使用它来和主机相互通信当创建一个docker容器的时候它就创建了一个对接口当数据包发送到一个接口时另外一个接口也可以收到相同的数据包它们是绑在一起的一对孪生接口这对接口在容器中那一端的的名字是eth0宿主主机端的会指定一个唯一的名字比如vethAQI2QT这样的名字这种接口名字不再主机的命名空间中所有的veth*的接口都会桥接到docker0这样docker就创建了在主机和所有容器之间一个虚拟共享网络
# 高级网络配置
>注意本章属于 `Docker` 高级配置如果您是初学者您可以暂时跳过本章节直接学习 [Docker Compose](../compose) 一节
![Docker网络](../images/docker0.png)
本章将介绍 Docker 的一些高级网络配置和选项
接下来的部分将介绍在一些场景中docker所有的网络定制配置linux的原生命令将调整补充甚至替换docker默认的网络配置
Docker 启动时会自动在主机上创建一个 `docker0` 虚拟网桥实际上是 Linux 的一个 bridge可以理解为一个软件交换机它会在挂载到它的网口之间进行转发
同时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 所有的网络定制配置以及通过 Linux 命令来调整补充甚至替换 Docker 默认的网络配置

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@@ -0,0 +1,56 @@
# 容器访问控制
容器的访问控制主要通过 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 服务 dockerd的时候默认会添加一条转发策略到本地主机 iptables FORWARD 链上策略为通过`ACCEPT`还是禁止`DROP`取决于配置`--icc=true`缺省值还是 `--icc=false`当然如果手动指定 `--iptables=false` 则不会添加 `iptables` 规则
可见默认情况下不同容器之间是允许网络互通的如果为了安全考虑可以在 `/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)
target prot opt source destination
DROP all -- 0.0.0.0/0 0.0.0.0/0
...
```
之后启动容器`docker run`时使用 `--link=CONTAINER_NAME:ALIAS` 选项Docker 会在 `iptable` 中为 两个容器分别添加一条 `ACCEPT` 规则允许相互访问开放的端口取决于 `Dockerfile` 中的 `EXPOSE` 指令
当添加了 `--link=CONTAINER_NAME:ALIAS` 选项后添加了 `iptables` 规则
```bash
$ sudo iptables -nL
...
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- 172.17.0.2 172.17.0.3 tcp spt:80
ACCEPT tcp -- 172.17.0.3 172.17.0.2 tcp dpt:80
DROP all -- 0.0.0.0/0 0.0.0.0/0
```
注意`--link=CONTAINER_NAME:ALIAS` 中的 `CONTAINER_NAME` 目前必须是 Docker 分配的名字或使用 `--name` 参数指定的名字主机名则不会被识别

View File

@@ -1,20 +1,28 @@
##创建自己的桥接
如果希望完全使用自己的桥接设置可以在启动docker服务的时候使用 -b BRIDGE or --bridge=BRIDGE 来告诉docker使用你的网桥如果服务已经启动旧的网桥还在使用中那需要先停止服务再删除旧的网桥
```
#停止旧网桥并删除
$ sudo service docker stop
# 自定义网桥
除了默认的 `docker0` 网桥用户也可以指定网桥来连接各个容器
在启动 Docker 服务的时候使用 `-b BRIDGE``--bridge=BRIDGE` 来指定使用的网桥
如果服务已经运行那需要先停止服务并删除旧的网桥
```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
@@ -22,10 +30,16 @@ $ ip addr show bridge0
valid_lft forever preferred_lft forever
```
Docker 配置文件 `/etc/docker/daemon.json` 中添加如下内容即可将 Docker 默认桥接到创建的网桥上
```json
{
"bridge": "bridge0",
}
```
# 告诉docker桥接设置并启动docker服务在ubuntu上
$ echo 'DOCKER_OPTS="-b=bridge0"' >> /etc/default/docker
$ sudo service docker start
```
docker服务启动成功并绑定容器到新的网桥新建一个容器你会看到它的ip是我们的设置的新ip段docker会自动检测到它用brctl
show可以看到容器启动或则停止后网桥的配置变化在容器中使用```ip addr``````ip route```来查看ip地址配置和路由信息
启动 Docker 服务
新建一个容器可以看到它已经桥接到了 `bridge0`
可以继续用 `brctl show` 命令查看桥接的信息另外在容器中可以使用 `ip addr` `ip route` 命令来查看 IP 地址配置和路由信息

View File

@@ -1,39 +0,0 @@
##容器之间的通信
判断2个容器之间是否能够通信在操作系统层面取决于3个因素
* 网络拓扑是否连接到容器的网络接口默认docker会将所有的容器连接到docker0这网桥来提供数据包通信其他拓扑结构将在稍后的文档中详细介绍
* 主机是否开启ip转发ip_forward参数为1的时候可以提供数据包转发通常你只需要为docker 设定 --ip-forward=true,
docker 就会在服务启动的时候设定ip_forward参数为1下面是手工检查并手工设定该参数的方法
```
# Usually not necessary: turning on forwarding,
# on the host where your Docker server is running
$ cat /proc/sys/net/ipv4/ip_forward
0
$ sudo echo 1 > /proc/sys/net/ipv4/ip_forward
$ cat /proc/sys/net/ipv4/ip_forward
1
```
*你的iptables是否允许这条特殊的连接被建立当docker的设定--iptables=false时docker不会改变系统的iptables
设定否则它会在--icc=true的时候添加一条默认的ACCEPT策略到 FORWARD链icc=false时策略为DROP几乎所有的人都会开启ip_forward来启用容器间的通信但是否要改变icc-true配置是一个战略问题这样iptable就可以防止其他被感染容器对宿主主机的恶意端口扫描和访问
当你选择更安全的设定--icc=false后如何保持你希望的容器之间通信呢
答案就是--link=CONTAINER_NAME:ALIAS选项在之前的dns服务设定中提及过如果docker 使用icc=false and --iptables=true 2个参数当docker run使用--link=选型时docker会为2个容器在iptable中参数一对ACCEPT规则开放的端口取决与dockerfile中的EXPOSE行详见第五章
注意--link= 中的CONTAINER_NAME 必须是自动生成的docker名字比如stupefied_pare或者你用--name参数指定的名字主机名在--link中不会被识别
你可以使用iptables命令来检查FORWARD链是ACCEPT 还是DROP
--icc=false时默认规则应该是这样
```
$ sudo iptables -L -n
...
Chain FORWARD (policy ACCEPT)
target prot opt source destination
DROP all -- 0.0.0.0/0 0.0.0.0/0
...
```
当添加了--link后ACCEPT规则被改写了添加了新的端口和IP规则
```
$ sudo iptables -L -n
...
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- 172.17.0.2 172.17.0.3 tcp spt:80
ACCEPT tcp -- 172.17.0.3 172.17.0.2 tcp dpt:80
DROP all -- 0.0.0.0/0 0.0.0.0/0
```

View File

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

View File

@@ -1,25 +0,0 @@
##配置DNS
docker没有定制为每一个容器定制image是怎么提供容器的主机名和dns配置呢秘诀就是它用主机上的3个配置文件来覆盖容器的这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 ...
...
```
这种机制可以让宿主主机从dhcp更新dns信息后马上更新所有docker容器的dns配置如果要保持docker中这些文件固定不变你可以不覆盖容器中的这些配置文件然后使用下面的选项来配置它们
配置容器dns服务的方法
-h HOSTNAME or --hostname=HOSTNAME
设定容器的主机名它会被写到/etc/hostname/etc/hosts中的ip地址自动写成分配的ip地址/bin/bash中显示该主机名但它不会在docker ps中显示也不会在其他的容器的/etc/hosts中显示
--link=CONTAINER_NAME:ALIAS
这选项会在创建容器的时候添加一个其他容器CONTAINE_NAME的主机名到/etc/hosts文件中让新容器的进程可以使用主机名ALIAS就可以连接它--link=会在容器之间的通信中更详细的介绍
--dns=IP_ADDRESS
添加dns服务器到容器的/etc/resolv,conf中让容器用这ip地址来解析所有不在/etc/hosts中的主机名
--dns-search=DOMAIN
设定容器的搜索域当设定搜索域为.example.com时会在搜索一个host主机名时dns不仅搜索host还会搜索host.example.com
注意如果没有上述最后2个选项docker会用主机上的/etc/resolv.conf来配置容器它是默认配置

View File

@@ -1,20 +1,28 @@
##定制docker0
docker服务默认会创建一个docker0接口它在linux内核层桥接所有物理或虚拟网卡这就将所有容器和主机接口都放到同一个物理网络
Docker指定了docker0的ip地址和子网掩码让主机和容器之间可以通过网桥相互通信它还给出了MTU-接口允许接收的最大传输单元通常是1500bytes或宿主主机网络路由上支持的默认值这2个都需要在服务启动的时候配置
* --bip=CIDR 192.168.1.5/24.ip地址加掩码 使用这种格式
* --mtu=BYTES 覆盖默认的docker mtu配置
# 配置 docker0 网桥
你可以在配置文件中配置DOCKER_OPTS然后重启来改变这些参数
```
# 当容器启动后你可以使用brctl来确认他们是否已经连接到docker0网桥
Docker 服务默认会创建一个 `docker0` 网桥其上有一个 `docker0` 内部接口它在内核层连通了其他的物理或虚拟网卡这就将所有容器和本地主机都放到同一个物理网络
Docker 默认指定了 `docker0` 接口 IP 地址和子网掩码让主机和容器之间可以通过网桥相互通信它还给出了 MTU接口允许接收的最大传输单元通常是 1500 Bytes或宿主主机网络路由上支持的默认值这些值都可以在服务启动的时候进行配置
* `--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
vethdda6
```
如果brctl命令没安装的话在ubuntu中你可以使用apt-get install bridge-utils这个命令来安装
docker0 网桥设置会在每次创建新容器的时候被使用docker从可用的地址段中选择一个空闲的ip地址给容器的eth0端口子网掩码使用网桥docker0的配置docker主机本身的ip作为容器的网关使用
```
*`brctl` 命令在 DebianUbuntu 中可以使用 `sudo apt-get install bridge-utils` 来安装
每次创建一个新容器的时候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
@@ -26,6 +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
```
转发数据包需要在主机上设定ip_forward参数为1,上文介绍过

View File

@@ -1,8 +1,9 @@
##工具和示例
在介绍自定义网络拓扑之前你可能会对一些外部工具和例子感兴趣
https://github.com/jpetazzo/pipework
Jérôme Petazzoni 创建了一个叫pipework的shell脚本来帮助我们在复杂的场景中完成网络连接
# 工具和示例
https://github.com/brandon-rhodes/fopnp/tree/m/playground
Brandon Rhodes创建了一个完整的docker容器网络拓扑包含 nat 防火墙服务包括HTTP, SMTP, POP, IMAP, Telnet, SSH, and FTP:
工具使用的网络命令跟我们之前看到非常相似
在介绍自定义网络拓扑之前你可能会对一些外部工具和例子感兴趣
## 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` 的服务器。

View File

@@ -1,23 +0,0 @@
##快速配置指南
下面是一个跟docker网络相关的命令列表希望可以让你快速找到需要的信息有些命令选项只有在docker服务启动的时候才可以执行而且不能马上生效
* -b BRIDGE or --bridge=BRIDGE 桥接配置
* --bip=CIDR 定制docker0的掩码
* -H SOCKET... or --host=SOCKET... 它告诉docker从哪个通道来接收run container stop
container这样的命令也是docker api的地址
* --icc=true|false 请看下文容器之间的通信
* --ip-forward=true|false 请看下文容器之间的通信
* --iptables=true|false 请看下文容器之间的通信
* --mtu=BYTES 请看下文定制docker0
下面2个可以在docker服务启动和docker run执行的时候指定服务启动的时候指定则会为docker run设定默认值docker run 后面指定可以覆盖默认值
* --dns=IP_ADDRESS... 请看下文dns配置
* --dns-search=DOMAIN... 请看下文dns配置
最后这些选项只有在docker run后执行因为它是针对容器的特性内容
*-h HOSTNAME or --hostname=HOSTNAME 主机名配置
*--link=CONTAINER_NAME:ALIAS link系统
*--net=bridge|none|container:NAME_or_ID|host 桥接配置
*-p SPEC or --publish=SPEC 映射容器端口到宿主主机
* -P or --publish-all=true|false 映射容器端口到宿主主机

View File

@@ -1,60 +1 @@
##Docker 如何连接到容器
让我们回顾一些基础知识
机器需要一个网络接口来发送和接受数据包路由表来定义如何到达哪些地址段这里的网络接口可以不是物理接口事实上每个linxu机器上的lo环回接口docker 容器中也有就是一个完全的linux内核虚拟接口它直接复制发送缓存中的数据包到接收缓存中docker让宿主主机和容器使用特殊的虚拟接口来通信--通信的2端叫peers他们在主机内核中连接在一起所以能够相互通信创建他们很简单前面介绍过了
docker创建容器的步骤如下
* 创建一对虚拟接口
* 其中宿主主机一端使用一个名字比如veth65f9他是唯一的,另外一端桥接到默认的docker0,或其它你指定的桥接网卡
* 主机上的veth65f9这种接口映射到新的新容器中的名称通常是eth0,在容器这个隔离的network namespace
它是唯一的不会有其他接口名字和它冲突
* 从主机桥接网卡的地址段中获取一个空闲地址给eth0使用并设定默认路由到桥接网卡
* 完成这些之后容器就可以使用这eth0虚拟网卡来连接其他容器和其他网络
你也可以为特殊的容器设定特定的参数在docker run的时候使用--net它有4个可选参数
* --net=bridge .默认连接到docker0网桥
* --net=host 告诉docker不要将容器放到隔离的网络堆栈中从本质上讲这个选项告诉docker
不要容器化容器的网络尽管容器还是有自己的文件系统进程列表和资源限制但使用ip addr命令这样命令就可以知道实际上此时的的容器处于和docker 宿主主机的一样的网络级别它拥有完全的宿主主机接口访问权限虽然它不允许容器重新配置主机的网络堆栈除非--privileged=true 但是容器进程可以跟其他root进程一样可以打开低数字的端口可以访问本地网络服务比如D-bus还可以让容器做一些意想不到的事情比如重启主机使用这个选项的时候要非常小心
* --net=container:NAME_or_ID
告诉docker将新容器的进程放到一个已经存在的容器的网络堆栈中新容器进程有它自己的文件系统进程列表和资源限制但它会和那个已经存在的容器共享ip地址和端口他们之间来可以通过环回接口通信
* --net=none 告诉docker将新容器放到自己的网络堆栈中但是不要配置它的网络,
类似于vmware的host-only这可以让你创建任何自定义的配置本文最后一段将介绍 他们
下面通过配置一个以--net=none启动的容器使他达到跟平常一样具有访问网络的权限来介绍docker是如何连接到容器中的
启动一个/bin/bash 指定--net=none
```
$ sudo docker run -i -t --rm --net=none base /bin/bash
root@63f36fc01b5f:/#
```
再开启一个新的终端查找这个容器的进程id然后创建它的命名空间后面的ip netns会用到
```$ sudo docker inspect -f '{{.State.Pid}}' 63f36fc01b5f
2778
$ pid=2778
$ sudo mkdir -p /var/run/netns
$ sudo ln -s /proc/$pid/ns/net /var/run/netns/$pid
```
检查桥接网卡的ip和子网掩码
```
$ ip addr show docker0
21: docker0: ...
inet 172.17.42.1/16 scope global docker0
...
```
创建一对peer接口A和B绑定A到网桥并启用它
```
$ sudo ip link add A type veth peer name B
$ sudo brctl addif docker0 A
$ sudo ip link set A up
```
将B放到容器的网络命名空间命名为eth0,配置一个空闲的ip
```
$ sudo ip link set B netns $pid
$ sudo ip netns exec $pid ip link set dev B name eth0
$ sudo ip netns exec $pid ip link set eth0 up
$ sudo ip netns exec $pid ip addr add 172.17.42.99/16 dev eth0
$ sudo ip netns exec $pid ip route add default via 172.17.42.1
```
自此你又可以像平常一样使用网络了
当你退出shell后docker清空容器容器的eth0随网络命名空间一起被摧毁A 接口也被自动从docker0取消注册不用其他命令所有东西都被清理掉了
注意ip netns exec命令它可以让我们像root一样配置网络命名空间但在容器内部无法使用因为统一的安全策略docker限制容器进程配置自己的网络使用ip netns exec 可以让我们不用设置--privileged=true就可以完成一些可能带来危险的操作

View File

@@ -1,10 +1,15 @@
##映射一个容器端口到宿主主机
# 映射容器端口到宿主主机的实现
默认情况下容器可以建立到外部网络的连接但是外部网络无法连接到容器所有到外部的连接源地址都会被伪装成宿主主机的ip地址iptables的 masquerading来做到这一点
默认情况下容器可以主动访问到外部网络的连接但是外部网络无法访问到容器
```
# 查看主机的masquerading规则
$ sudo iptables -t nat -L -n
## 容器访问外部实现
容器所有到外部网络的连接源地址都会被 NAT 成本地系统的 IP 地址这是使用 `iptables` 的源地址伪装操作实现的
查看主机的 NAT 规则
```bash
$ sudo iptables -t nat -nL
...
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
@@ -12,26 +17,41 @@ MASQUERADE all -- 172.17.0.0/16 !172.17.0.0/16
...
```
当你希望容器接收外部连接时你需要在docker run执行的时候就指定对应选项第五章详细介绍了2种方法
* 指定-P --publish-all=true|false 选项会映射dockerfile
中expose的所有端口主机端口在49000-49900中随机挑选当你的另外一个容器需要学习这个端口时候很不方便
* 指定-p SPEC或则 --publish=SPEC,可以指定任意端口从主机映射容器内部
其中上述规则将所有源地址在 `172.17.0.0/16` 网段目标地址为其他网段外部网络的流量动态伪装为从系统网卡发出MASQUERADE 跟传统 SNAT 的好处是它能动态从网卡获取地址
不管用那种办法你可以通过查看iptable的 nat表来观察docker 在网络层做了什么操作
```
#使用-P时
$ iptables -t nat -L -n
## 外部访问容器实现
容器允许外部访问可以在 `docker run` 时候通过 `-p` `-P` 参数来启用
不管用那种办法其实也是在本地的 `iptable` nat 表中添加相应的规则
使用 `-P`
```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:49153 to:172.17.0.2:80
#使用-p 80:80时
$ iptables -t nat -L -n
```
使用 `-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
```
注意
* 这里看到docker映射了0.0.0.0.它接受主机上的所有接口地址可以通过-p IP:host_port:container_port 或则 -p
IP::port 来指定主机上的ip接口制定更严格的规则
* 如果你希望永久改变绑定的主机ip地址可以 在dcoker 配置中指定--ip=IP_ADDRESS. 记得重启服务
* 这里的规则映射了 `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,27 +1,31 @@
##创建一个点到点连接
默认docker会将所有容器连接到由docker0提供的虚拟子网你也可以使用自己创建的网桥但如果你想要2个特殊的容器之间可以直连通信而不用去配置复杂的主机网卡桥接
解决办法很简单创建一对接口把2个容器放到这对接口中配置成点到点链路类型这2个容器就可以直接通信了配置如下
```
# 在2个终端中启动2个容器
$ sudo docker run -i -t --rm --net=none base /bin/bash
# 示例创建一个点到点连接
默认情况下Docker 会将所有容器连接到由 `docker0` 提供的虚拟子网
用户有时候需要两个容器之间可以直连通信而不用通过主机网桥进行桥接
解决办法很简单创建一对 `peer` 接口分别放到两个容器中配置成点到点链路类型即可
首先启动 2 个容器
```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:/#
```
找到他们的process IDs 然后创建他们的 namespace entries
```
$ 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
$ sudo ln -s /proc/3004/ns/net /var/run/netns/3004
```
创建"peer"接口然后配置路由
```
创建一对 `peer` 接口然后配置路由
```bash
$ sudo ip link add A type veth peer name B
$ sudo ip link set A netns 2989
@@ -34,7 +38,8 @@ $ sudo ip netns exec 3004 ip addr add 10.1.1.2/32 dev B
$ sudo ip netns exec 3004 ip link set B up
$ sudo ip netns exec 3004 ip route add 10.1.1.1/32 dev B
```
现在这2个容器就可以相互ping通并成功建立连接点到点链路不需要子网和子网掩码使用ip route 来连接单个ip地址到指定的网络接口
如果没有特殊需要你不需要指定--net=none来创建点到点链路
现在这 2 个容器就可以相互 ping 并成功建立连接点到点链路不需要子网和子网掩码
还有一个办法就是创建一个只跟主机通信的容器除非有特殊需求可以仅用--icc=false来限制主机间的通信
此外可以不指定 `--net=none` 来创建点到点链路这样容器还可以通过原先的网络来通信
利用类似的办法可以创建一个只跟主机通信的容器但是一般情况下更推荐使用 `--icc=false` 来关闭容器之间的通信

View File

@@ -0,0 +1,26 @@
# 快速配置指南
下面是一个跟 Docker 网络相关的命令列表
其中有些命令选项只有在 Docker 服务启动的时候才能配置而且不能马上生效
* `-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` `--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

@@ -0,0 +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}
}

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 udpate` 缓存失效并确保安装的是新版本
另外清理掉 apt 缓存 `var/lib/apt/lists` 可以减小镜像大小因为 `RUN` 指令的开头为 `apt-get udpate`包缓存总是会在 `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,7 +0,0 @@
#架构
docker使用C/S架构docker daemon作为server端接受client的请求并处理创建运行分发容器他们可以运行在一个机器上也通过sockerts或者RESTful API通信
![Docker基本架构](../images/docker_arch.png)
Docker daemon一般在宿主主机后台运行用户使用client而直接跟daemon交互Docker client 以系统做bin命令的形式存在用户用docker命令来跟docker daemon交互

View File

@@ -1,9 +0,0 @@
当我们运行`docker run -i -t ubuntu /bin/bash`命令时docker 在后台运行的操作如下
* 如果本地有ubuntu这个image就从它创建容器否则从公有仓库下载
* 从image创建容器
* 分配一个文件系统并在只读的image层外面挂载一层可读写的层
* 从宿主主机配置的网桥接口中桥接一个虚拟接口到容器中去
* 从地址池配置一个ip地址给容器
* 执行你指定的程序在这里启动一个/bin/bash进程
* -i -t 指定标准输入和输出

View File

@@ -1,3 +0,0 @@
每个docker都有很多层次构成docker使用 union file systems 将这些不同的层结合到一个image中去
AUFS (AnotherUnionFS) 是一种 Union FS, 简单来说就是支持将不同目录挂载到同一个虚拟文件系统下(unite several directories into a single virtual filesystem)的文件系统, 更进一步的理解, AUFS支持为每一个成员目录(类似Git Branch)设定readonlyreadwrite whiteout-able 权限, 同时 AUFS 里有一个类似分层的概念, readonly 权限的 branch 可以逻辑上进行修改(增量地, 不影响 readonly 部分的)通常 Union FS 有两个用途, 一方面可以实现不借助 LVMRAID 将多个disk挂到同一个目录下, 另一个更常用的就是将一个 readonly branch 和一个 writeable branch 联合在一起Live CD正是基于此方法可以允许在 OS image 不变的基础上允许用户在其上进行一些写操作Docker AUFS 上构建的 container image 也正是如此

View File

@@ -1,13 +0,0 @@
docker有三个内部组件
* docker images
* docker registries
* docker containers
### Docker images
docker images 就是一个只读的模板比如一个image可以包含一个ubuntu的操作系统里面安装了apache或者你需要的应用程序images可以用来创建docker containersdocker提供了一个很简单的机制来创建images或者更新现有的images你甚至可以直接从其他人那里下载一个已经做好的images
###Docker registries
Docker registries 也叫docker 仓库它有公有仓库和私有仓库2种形式他们都可以用来让你上传和下载images公有的仓库也叫 Docker Hub它提供了一个巨大的image库可以让你下载你也可以在自己的局域网内建一个自己的私有仓库
###Docker containers
Docker containers也叫docker容器容器是从image镜像创建的它可以被启动开始停止删除每个容器都是相互隔离的安全的平台

View File

@@ -1 +0,0 @@
docker仓库用来保存我们的images当我们创建了自己的image之后我们就可以使用push命令将它上传到公有或者私有仓库这样下次要在另外一台机器上使用这个image时候只需要从仓库上pull下来就可以了

View File

@@ -1,23 +0,0 @@
docker底层的2个核心技术分别是Namespaces和Control groups
以下内容摘自InfoQ Docker自1.20版本开始docker已经抛开lxc不过下面的内容对于理解docker还是有很大帮助
###pid namespace
不同用户的进程就是通过pid namespace隔离开的且不同 namespace 中可以有相同pid所有的LXC进程在docker中的父进程为docker进程每个lxc进程具有不同的namespace同时由于允许嵌套因此可以很方便的实现 Docker in Docker
###net namespace
有了 pid namespace, 每个namespace中的pid能够相互隔离但是网络端口还是共享host的端口网络隔离是通过net namespace实现的 每个net namespace有独立的 network devices, IP addresses, IP routing tables, /proc/net 目录这样每个container的网络就能隔离开来docker默认采用veth的方式将container中的虚拟网卡同host上的一个docker bridge: docker0连接在一起
###ipc namespace
container中进程交互还是采用linux常见的进程间交互方法(interprocess communication - IPC), 包括常见的信号量消息队列和共享内存然而同 VM 不同的是container 的进程间交互实际上还是host上具有相同pid namespace中的进程间交互因此需要在IPC资源申请时加入namespace信息 - 每个IPC资源有一个唯一的 32 ID
###mnt namespace
类似chroot将一个进程放到一个特定的目录执行mnt namespace允许不同namespace的进程看到的文件结构不同这样每个 namespace 中的进程所看到的文件目录就被隔离开了同chroot不同每个namespace中的container在/proc/mounts的信息只包含所在namespace的mount point
###uts namespace
UTS("UNIX Time-sharing System") namespace允许每个container拥有独立的hostname和domain name, 使其在网络上可以被视作一个独立的节点而非Host上的一个进程
###user namespace
每个container可以有不同的 user group id, 也就是说可以在container内部用container内部的用户执行程序而非Host上的用户
Control groups主要用来隔离各个容器和宿主主机的资源利用

7
archive/README.md Normal file
View File

@@ -0,0 +1,7 @@
# 归档项目
以下项目不被官方支持或内容陈旧将在下一版本中删除或已经删除
* [Docker Machine](https://github.com/yeasy/docker_practice/tree/ca29ab51b121f43563f5d6659dedbda5cb6f048d/machine)
* [Docker Swarm](https://github.com/yeasy/docker_practice/tree/ca29ab51b121f43563f5d6659dedbda5cb6f048d/swarm)
* Mesos

8
basic_concept/README.md Normal file
View File

@@ -0,0 +1,8 @@
# 基本概念
**Docker** 包括三个基本概念
* **镜像**`Image`
* **容器**`Container`
* **仓库**`Repository`
理解了这三个概念就理解了 **Docker** 的整个生命周期

View File

@@ -0,0 +1,13 @@
# Docker 容器
镜像`Image`和容器`Container`的关系就像是面向对象程序设计中的 `` `实例` 一样镜像是静态的定义容器是镜像运行时的实体容器可以被创建启动停止删除暂停等
容器的实质是进程但与直接在宿主执行的进程不同容器进程运行于属于自己的独立的 [命名空间](https://en.wikipedia.org/wiki/Linux_namespaces)。因此容器可以拥有自己的 `root` 文件系统、自己的网络配置、自己的进程空间,甚至自己的用户 ID 空间。容器内的进程是运行在一个隔离的环境里,使用起来,就好像是在一个独立于宿主的系统下操作一样。这种特性使得容器封装的应用比直接在宿主运行更加安全。也因为这种隔离的特性,很多人初学 Docker 时常常会混淆容器和虚拟机。
前面讲过镜像使用的是分层存储容器也是如此每一个容器运行时是以镜像为基础层在其上创建一个当前容器的存储层我们可以称这个为容器运行时读写而准备的存储层为 **容器存储层**
容器存储层的生存周期和容器一样容器消亡时容器存储层也随之消亡因此任何保存于容器存储层的信息都会随容器删除而丢失
按照 Docker 最佳实践的要求容器不应该向其存储层内写入任何数据容器存储层要保持无状态化所有的文件写入操作都应该使用 [数据卷Volume](../data_management/volume.md)或者 [绑定宿主目录](../data_management/bind-mounts.md)在这些位置的读写会跳过容器存储层直接对宿主或网络存储发生读写其性能和稳定性更高
数据卷的生存周期独立于容器容器消亡数据卷不会消亡因此使用数据卷后容器删除或者重新运行之后数据却不会丢失

15
basic_concept/image.md Normal file
View File

@@ -0,0 +1,15 @@
# Docker 镜像
我们都知道操作系统分为 **内核** **用户空间**对于 `Linux` 而言内核启动后会挂载 `root` 文件系统为其提供用户空间支持 **Docker 镜像**`Image`就相当于是一个 `root` 文件系统比如官方镜像 `ubuntu:18.04` 就包含了完整的一套 Ubuntu 18.04 最小系统的 `root` 文件系统
**Docker 镜像** 是一个特殊的文件系统除了提供容器运行时所需的程序资源配置等文件外还包含了一些为运行时准备的一些配置参数如匿名卷环境变量用户等镜像 **不包含** 任何动态数据其内容在构建之后也不会被改变
## 分层存储
因为镜像包含操作系统完整的 `root` 文件系统其体积往往是庞大的因此在 Docker 设计时就充分利用 [Union FS](https://en.wikipedia.org/wiki/Union_mount) 的技术,将其设计为分层存储的架构。所以严格来说,镜像并非是像一个 `ISO` 那样的打包文件,镜像只是一个虚拟的概念,其实际体现并非由一个文件组成,而是由一组文件系统组成,或者说,由多层文件系统联合组成。
镜像构建时会一层层构建前一层是后一层的基础每一层构建完就不会再发生改变后一层上的任何改变只发生在自己这一层比如删除前一层文件的操作实际不是真的删除前一层的文件而是仅在当前层标记为该文件已删除在最终容器运行的时候虽然不会看到这个文件但是实际上该文件会一直跟随镜像因此在构建镜像的时候需要额外小心每一层尽量只包含该层需要添加的东西任何额外的东西应该在该层构建结束前清理掉
分层存储的特征还使得镜像的复用定制变的更为容易甚至可以用之前构建好的镜像作为基础层然后进一步添加新的层以定制自己所需的内容构建新的镜像
关于镜像构建将会在后续相关章节中做进一步的讲解

View File

@@ -0,0 +1,29 @@
# Docker Registry
镜像构建完成后可以很容易的在当前宿主机上运行但是如果需要在其它服务器上使用这个镜像我们就需要一个集中的存储分发镜像的服务[Docker Registry](../repository/registry.md) 就是这样的服务
一个 **Docker Registry** 中可以包含多个 **仓库**`Repository`每个仓库可以包含多个 **标签**`Tag`每个标签对应一个镜像
通常一个仓库会包含同一个软件不同版本的镜像而标签就常用于对应该软件的各个版本我们可以通过 `<仓库名>:<标签>` 的格式来指定具体是这个软件哪个版本的镜像如果不给出标签将以 `latest` 作为默认标签
[Ubuntu 镜像](https://hub.docker.com/_/ubuntu) 为例,`ubuntu` 是仓库的名字,其内包含有不同的版本标签,如,`16.04`, `18.04`。我们可以通过 `ubuntu:16.04`,或者 `ubuntu:18.04` 来具体指定所需哪个版本的镜像。如果忽略了标签,比如 `ubuntu`,那将视为 `ubuntu:latest`。
仓库名经常以 *两段式路径* 形式出现比如 `jwilder/nginx-proxy`前者往往意味着 Docker Registry 多用户环境下的用户名后者则往往是对应的软件名但这并非绝对取决于所使用的具体 Docker Registry 的软件或服务
## Docker Registry 公开服务
Docker Registry 公开服务是开放给用户使用允许用户管理镜像的 Registry 服务一般这类公开服务允许用户免费上传下载公开的镜像并可能提供收费服务供用户管理私有镜像
最常使用的 Registry 公开服务是官方的 [Docker Hub](https://hub.docker.com/),这也是默认的 Registry并拥有大量的高质量的 [官方镜像](https://hub.docker.com/search?q=&type=image&image_filter=official)。除此以外,还有 Red Hat 的 [Quay.io](https://quay.io/repository/)Google 的 [Google Container Registry](https://cloud.google.com/container-registry/)[Kubernetes](https://kubernetes.io/) 的镜像使用的就是这个服务;代码托管平台 [GitHub](https://github.com) 推出的 [ghcr.io](https://docs.github.com/cn/packages/working-with-a-github-packages-registry/working-with-the-container-registry)。
由于某些原因在国内访问这些服务可能会比较慢国内的一些云服务商提供了针对 Docker Hub 的镜像服务`Registry Mirror`这些镜像服务被称为 **加速器**常见的有 [阿里云加速器](https://www.aliyun.com/product/acr?source=5176.11533457&userCode=8lx5zmtu)、[DaoCloud 加速器](https://www.daocloud.io/mirror#accelerator-doc) 等。使用加速器会直接从国内的地址下载 Docker Hub 的镜像,比直接从 Docker Hub 下载速度会提高很多。在 [安装 Docker](../install/mirror.md) 一节中有详细的配置方法。
国内也有一些云服务商提供类似于 Docker Hub 的公开服务比如 [网易云镜像服务](https://c.163.com/hub#/m/library/)、[DaoCloud 镜像市场](https://hub.daocloud.io/)、[阿里云镜像库](https://www.aliyun.com/product/acr?source=5176.11533457&userCode=8lx5zmtu) 等。
## 私有 Docker Registry
除了使用公开服务外用户还可以在本地搭建私有 Docker RegistryDocker 官方提供了 [Docker Registry](https://hub.docker.com/_/registry/) 镜像,可以直接使用做为私有 Registry 服务。在 [私有仓库](../repository/registry.md) 一节中,会有进一步的搭建私有 Registry 服务的讲解。
开源的 Docker Registry 镜像只提供了 [Docker Registry API](https://docs.docker.com/registry/spec/api/) 的服务端实现,足以支持 `docker` 命令,不影响使用。但不包含图形界面,以及镜像维护、用户管理、访问控制等高级功能。
除了官方的 Docker Registry 还有第三方软件实现了 Docker Registry API甚至提供了用户界面以及一些高级功能比如[Harbor](https://github.com/goharbor/harbor) 和 [Sonatype Nexus](../repository/nexus3_registry.md)。

37
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"
}
}
}

5
buildx/README.md Normal file
View File

@@ -0,0 +1,5 @@
# Docker Buildx
Docker Buildx 是一个 docker CLI 插件其扩展了 docker 命令支持 [Moby BuildKit](buildkit.md) 提供的功能提供了与 docker build 相同的用户体验并增加了许多新功能
> 该功能仅适用于 Docker v19.03+ 版本

154
buildx/buildkit.md Normal file
View File

@@ -0,0 +1,154 @@
# 使用 `BuildKit` 构建镜像
**BuildKit** 是下一代的镜像构建组件 https://github.com/moby/buildkit 开源。
**注意如果您的镜像构建使用的是云服务商提供的镜像构建服务腾讯云容器服务阿里云容器服务等由于上述服务提供商的 Docker 版本低于 18.09BuildKit 无法使用将造成镜像构建失败建议使用 BuildKit 构建镜像时使用一个新的 Dockerfile 文件例如 Dockerfile.buildkit**
目前Docker Hub 自动构建已经支持 buildkit具体请参考 https://github.com/docker-practice/docker-hub-buildx
## `Dockerfile` 新增指令详解
启用 `BuildKit` 之后我们可以使用下面几个新的 `Dockerfile` 指令来加快镜像构建
### `RUN --mount=type=cache`
目前几乎所有的程序都会使用依赖管理工具例如 `Go` 中的 `go mod``Node.js` 中的 `npm` 等等当我们构建一个镜像时往往会重复的从互联网中获取依赖包难以缓存大大降低了镜像的构建效率
例如一个前端工程需要用到 `npm`
```docker
FROM node:alpine as builder
WORKDIR /app
COPY package.json /app/
RUN npm i --registry=https://registry.npm.taobao.org \
&& rm -rf ~/.npm
COPY src /app/src
RUN npm run build
FROM nginx:alpine
COPY --from=builder /app/dist /app/dist
```
使用多阶段构建构建的镜像中只包含了目标文件夹 `dist`但仍然存在一些问题 `package.json` 文件变动时`RUN npm i && rm -rf ~/.npm` 这一层会重新执行变更多次后生成了大量的中间层镜像
为解决这个问题进一步的我们可以设想一个类似 **数据卷** 的功能在镜像构建时把 `node_modules` 文件夹挂载上去在构建完成后这个 `node_modules` 文件夹会自动卸载实际的镜像中并不包含 `node_modules` 这个文件夹这样我们就省去了每次获取依赖的时间大大增加了镜像构建效率同时也避免了生成了大量的中间层镜像
`BuildKit` 提供了 `RUN --mount=type=cache` 指令可以实现上边的设想
```docker
# syntax = docker/dockerfile:experimental
FROM node:alpine as builder
WORKDIR /app
COPY package.json /app/
RUN --mount=type=cache,target=/app/node_modules,id=my_app_npm_module,sharing=locked \
--mount=type=cache,target=/root/.npm,id=npm_cache \
npm i --registry=https://registry.npm.taobao.org
COPY src /app/src
RUN --mount=type=cache,target=/app/node_modules,id=my_app_npm_module,sharing=locked \
# --mount=type=cache,target=/app/dist,id=my_app_dist,sharing=locked \
npm run build
FROM nginx:alpine
# COPY --from=builder /app/dist /app/dist
# 为了更直观的说明 from 和 source 指令,这里使用 RUN 指令
RUN --mount=type=cache,target=/tmp/dist,from=builder,source=/app/dist \
# --mount=type=cache,target/tmp/dist,from=my_app_dist,sharing=locked \
mkdir -p /app/dist && cp -r /tmp/dist/* /app/dist
```
**由于 `BuildKit` 为实验特性每个 `Dockerfile` 文件开头都必须加上如下指令**
```docker
# syntax = docker/dockerfile:experimental
```
第一个 `RUN` 指令执行后`id` `my_app_npm_module` 的缓存文件夹挂载到了 `/app/node_modules` 文件夹中多次执行也不会产生多个中间层镜像
第二个 `RUN` 指令执行时需要用到 `node_modules` 文件夹`node_modules` 已经挂载命令也可以正确执行
第三个 `RUN` 指令将上一阶段产生的文件复制到指定位置`from` 指明缓存的来源这里 `builder` 表示缓存来源于构建的第一阶段`source` 指明缓存来源的文件夹
上面的 `Dockerfile` `--mount=type=cache,...` 中指令作用如下
|Option |Description|
|---------------------|-----------|
|`id` | `id` 设置一个标志以便区分缓存|
|`target` (必填项) | 缓存的挂载目标文件夹|
|`ro`,`readonly` | 只读缓存文件夹不能被写入 |
|`sharing` | `shared` `private` `locked` 值可供选择`sharing` 设置当一个缓存被多次使用时的表现由于 `BuildKit` 支持并行构建当多个步骤使用同一缓存时同一 `id`会发生冲突`shared` 表示多个步骤可以同时读写`private` 表示当多个步骤使用同一缓存时每个步骤使用不同的缓存`locked` 表示当一个步骤完成释放缓存后后一个步骤才能继续使用该缓存|
|`from` | 缓存来源构建阶段不填写时为空文件夹|
|`source` | 来源的文件夹路径|
### `RUN --mount=type=bind`
该指令可以将一个镜像或上一构建阶段的文件挂载到指定位置
```docker
# syntax = docker/dockerfile:experimental
RUN --mount=type=bind,from=php:alpine,source=/usr/local/bin/docker-php-entrypoint,target=/docker-php-entrypoint \
cat /docker-php-entrypoint
```
### `RUN --mount=type=tmpfs`
该指令可以将一个 `tmpfs` 文件系统挂载到指定位置
```docker
# syntax = docker/dockerfile:experimental
RUN --mount=type=tmpfs,target=/temp \
mount | grep /temp
```
### `RUN --mount=type=secret`
该指令可以将一个文件(例如密钥)挂载到指定位置
```docker
# syntax = docker/dockerfile:experimental
RUN --mount=type=secret,id=aws,target=/root/.aws/credentials \
cat /root/.aws/credentials
```
```bash
$ docker build -t test --secret id=aws,src=$HOME/.aws/credentials .
```
### `RUN --mount=type=ssh`
该指令可以挂载 `ssh` 密钥
```docker
# syntax = docker/dockerfile:experimental
FROM alpine
RUN apk add --no-cache openssh-client
RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
RUN --mount=type=ssh ssh git@gitlab.com | tee /hello
```
```bash
$ eval $(ssh-agent)
$ ssh-add ~/.ssh/id_rsa
(Input your passphrase here)
$ docker build -t test --ssh default=$SSH_AUTH_SOCK .
```
## docker-compose build 使用 Buildkit
设置 `COMPOSE_DOCKER_CLI_BUILD=1` 环境变量即可使用
## 官方文档
* https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/experimental.md

17
buildx/buildx.md Normal file
View File

@@ -0,0 +1,17 @@
# 使用 Buildx 构建镜像
## 使用
你可以直接使用 `docker buildx build` 命令构建镜像
```bash
$ docker buildx build .
[+] Building 8.4s (23/32)
=> ...
```
Buildx 使用 [BuildKit 引擎](buildkit.md) 进行构建支持许多新的功能具体参考 [Buildkit](buildkit.md) 一节
## 官方文档
* https://docs.docker.com/engine/reference/commandline/buildx/

126
buildx/multi-arch-images.md Normal file
View File

@@ -0,0 +1,126 @@
# 使用 buildx 构建多种系统架构支持的 Docker 镜像
在之前的版本中构建多种系统架构支持的 Docker 镜像要想使用统一的名字必须使用 [`$ docker manifest`](../image/manifest.md) 命令
Docker 19.03+ 版本中可以使用 `$ docker buildx build` 命令使用 `BuildKit` 构建镜像该命令支持 `--platform` 参数可以同时构建支持多种系统架构的 Docker 镜像大大简化了构建步骤
## 新建 `builder` 实例
Docker for Linux 不支持构建 `arm` 架构镜像我们可以运行一个新的容器让其支持该特性Docker 桌面版无需进行此项设置
```bash
$ docker run --rm --privileged tonistiigi/binfmt:latest --install all
```
由于 Docker 默认的 `builder` 实例不支持同时指定多个 `--platform`我们必须首先创建一个新的 `builder` 实例同时由于国内拉取镜像较缓慢我们可以使用配置了 [镜像加速地址](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md) 的 [`dockerpracticesig/buildkit:master`](https://github.com/docker-practice/buildx) 镜像替换官方镜像。
> 如果你有私有的镜像加速器可以基于 https://github.com/docker-practice/buildx 构建自己的 buildkit 镜像并使用它。
```bash
# 适用于国内环境
$ docker buildx create --use --name=mybuilder-cn --driver docker-container --driver-opt image=dockerpracticesig/buildkit:master
# 适用于腾讯云环境(腾讯云主机、coding.net 持续集成)
$ docker buildx create --use --name=mybuilder-cn --driver docker-container --driver-opt image=dockerpracticesig/buildkit:master-tencent
# $ docker buildx create --name mybuilder --driver docker-container
$ docker buildx use mybuilder
```
## 构建镜像
新建 Dockerfile 文件
```docker
FROM --platform=$TARGETPLATFORM alpine
RUN uname -a > /os.txt
CMD cat /os.txt
```
使用 `$ docker buildx build` 命令构建镜像注意将 `myusername` 替换为自己的 Docker Hub 用户名
`--push` 参数表示将构建好的镜像推送到 Docker 仓库
```bash
$ docker buildx build --platform linux/arm,linux/arm64,linux/amd64 -t myusername/hello . --push
# 查看镜像信息
$ docker buildx imagetools inspect myusername/hello
```
在不同架构运行该镜像可以得到该架构的信息
```bash
# arm
$ docker run -it --rm myusername/hello
Linux buildkitsandbox 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 armv7l Linux
# arm64
$ docker run -it --rm myusername/hello
Linux buildkitsandbox 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 aarch64 Linux
# amd64
$ docker run -it --rm myusername/hello
Linux buildkitsandbox 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 x86_64 Linux
```
## 架构相关变量
`Dockerfile` 支持如下架构相关的变量
**TARGETPLATFORM**
构建镜像的目标平台例如 `linux/amd64`, `linux/arm/v7`, `windows/amd64`
**TARGETOS**
`TARGETPLATFORM` OS 类型例如 `linux`, `windows`
**TARGETARCH**
`TARGETPLATFORM` 的架构类型例如 `amd64`, `arm`
**TARGETVARIANT**
`TARGETPLATFORM` 的变种该变量可能为空例如 `v7`
**BUILDPLATFORM**
构建镜像主机平台例如 `linux/amd64`
**BUILDOS**
`BUILDPLATFORM` OS 类型例如 `linux`
**BUILDARCH**
`BUILDPLATFORM` 的架构类型例如 `amd64`
**BUILDVARIANT**
`BUILDPLATFORM` 的变种该变量可能为空例如 `v7`
### 使用举例
例如我们要构建支持 `linux/arm/v7` `linux/amd64` 两种架构的镜像假设已经生成了两个平台对应的二进制文件
* `bin/dist-linux-arm`
* `bin/dist-linux-amd64`
那么 `Dockerfile` 可以这样书写
```docker
FROM scratch
# 使用变量必须申明
ARG TARGETOS
ARG TARGETARCH
COPY bin/dist-${TARGETOS}-${TARGETARCH} /dist
ENTRYPOINT ["dist"]
```

7
cases/ci/README.md Normal file
View File

@@ -0,0 +1,7 @@
# CI/CD
**持续集成(Continuous integration)** 是一种软件开发实践每次集成都通过自动化的构建包括编译发布自动化测试来验证从而尽早地发现集成错误
**持续部署(continuous deployment)** 是通过自动化的构建测试和部署循环来快速交付高质量的产品
`Jenkins` 不同的是基于 Docker CI/CD 每一步都运行在 Docker 容器中所以理论上支持所有的编程语言

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