690 Commits

Author SHA1 Message Date
Kang Huaishuai
e513d2ca27 Merge pull request #477 from caisah/patch-2
Fix typo in english/basic_concept/container.md
2020-11-15 20:45:31 +08:00
caisah
181707c8f7 Fix typo in english/basic_concept/container.md 2020-11-15 14:42:21 +02:00
Kang Huaishuai
c46ba5fbc1 Merge pull request #475 from caisah/patch-1
Fix typo
2020-11-15 20:09:37 +08:00
caisah
0f760f6844 Fix typo 2020-11-15 14:05:46 +02:00
Kang Huaishuai
44e6329acd Merge pull request #474 from Bill0412/english
translate image/list.md to English
2020-11-09 13:12:47 +08:00
Dorsey.Xu
d883eb5c7d update image/list.md 2020-11-04 18:03:35 +08:00
Kang Huaishuai
e9e6295d92 Merge pull request #472 from Bill0412/english
Translate image/pull.md to English
2020-10-28 21:25:56 +08:00
Dorsey.Xu
3a5fcee13a translate image/pull.md 2020-10-28 13:18:34 +08:00
Dorsey.Xu
8083ddc046 translage image/README.md 2020-10-28 10:13:00 +08:00
Kang Huaishuai
27b0545bcf Merge pull request #470 from Bill0412/english
Translate the install chapter to English
2020-10-26 17:09:50 +08:00
Dorsey.Xu
64e1d5b04c update install/mirror.md 2020-10-26 16:35:34 +08:00
Dorsey.Xu
7ed3d1c972 update install/windows.md 2020-10-26 15:30:35 +08:00
Dorsey.Xu
b1a962dfe3 translate install/mac.md 2020-10-26 15:26:51 +08:00
Dorsey.Xu
2887a3fc4d translate install/raspberry-pi.md 2020-10-26 15:03:45 +08:00
Dorsey.Xu
c0c5922d6e translate install/centos.md 2020-10-26 14:47:10 +08:00
Dorsey.Xu
21278b6b7b translate install/fedora.md 2020-10-26 14:08:12 +08:00
Dorsey.Xu
3dec5677d0 translate install/debian.md 2020-10-26 13:54:27 +08:00
Dorsey.Xu
0950e70380 update install/ubuntu.md 2020-10-26 13:33:37 +08:00
Dorsey.Xu
39e3887fd9 translate install/README.md 2020-10-26 13:21:10 +08:00
Kang Huaishuai
e157e1f835 Merge pull request #469 from Bill0412/english
Translate Basic Concept
2020-10-23 23:17:41 +08:00
Dorsey.Xu
527cdcfc32 translate basic_concept/repository.md 2020-10-23 18:06:39 +08:00
Dorsey.Xu
ca5b835622 fix: typo in container.md 2020-10-23 15:52:50 +08:00
Dorsey.Xu
aa8e4d7a1c rewrite basic_concept/README.md 2020-10-23 15:50:50 +08:00
Dorsey.Xu
b66723130c rewrite basic_concept/container.md 2020-10-23 15:46:45 +08:00
Dorsey.Xu
d8254f2ce6 fix: typo in us-en link 2020-10-23 14:49:43 +08:00
Kang Huaishuai
3231d7611c Merge pull request #468 from Bill0412/english
update image.md
2020-10-23 10:34:39 +08:00
Dorsey.Xu
1913dcbfa1 update image.md 2020-10-23 10:20:46 +08:00
Kang Huaishuai
07061db90a Update README.md 2020-10-22 14:20:32 +08:00
Kang Huaishuai
5e8e494998 remove machine meos 2020-10-22 14:17:54 +08:00
Kang Huaishuai
f670ec4e8c Merge pull request #467 from Bill0412/english
update introduction part of the English version
2020-10-22 14:16:27 +08:00
Dorsey.Xu
5bab0d8079 update introduction 2020-10-22 14:09:10 +08:00
Kang Huaishuai
490efab5a2 Merge pull request #422 from 00Kai0/english
update image
2019-10-02 22:06:52 +08:00
Kerwin.Sun
b2bd301ac8 update image 2019-10-02 22:03:48 +08:00
Kang Huaishuai
e94bdb6b39 Merge pull request #421 from 00Kai0/english
update ubuntu.md
2019-09-06 16:39:39 +08:00
Kang Huaishuai
18399a0036 Update ubuntu.md 2019-09-06 16:39:12 +08:00
Kerwin.Sun
3e1cf001d3 update 2019-09-06 16:27:21 +08:00
Kang HuaiShuai
28cbeeca74 add docker-practice.com
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-09-05 13:39:32 +08:00
Kang HuaiShuai
7cbedfcddc deploy pages to docker-practice/us-en 2019-09-05 13:06:29 +08:00
Kang Huaishuai
2e2f21ac25 Fixed error 2019-09-01 20:02:48 +08:00
Kang Huaishuai
fa38bf90d1 Merge branch 'master' into english 2019-09-01 19:58:45 +08:00
Kang Huaishuai
6c25c98941 Merge pull request #419 from 00Kai0/english
update windows.md
2019-09-01 19:30:47 +08:00
Kang Huaishuai
0f183b10c7 Update windows.md 2019-09-01 19:30:11 +08:00
Kerwin.Sun
690d4e3278 update 2019-09-01 18:27:36 +08:00
Kang
502356078d Fixed error
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2019-09-01 15:15:53 +08:00
khs1994
c87291ab7e Update Docker Desktop name
Signed-off-by: khs1994 <khs1994@khs1994.com>
2019-09-01 15:03:32 +08:00
khs1994
a0f166f62a [Machine] Update to v0.16.1
Signed-off-by: khs1994 <khs1994@khs1994.com>
2019-09-01 14:50:40 +08:00
khs1994
751cad4624 [Compose] Update to v1.24.1
Signed-off-by: khs1994 <khs1994@khs1994.com>
2019-09-01 14:46:33 +08:00
khs1994
b4e3899bf6 Update CoreOS: remove outdated quickstart 2019-09-01 14:16:10 +08:00
khs1994
1c6e1eb70a [etcd] Update to v3.4.x 2019-08-31 22:57:43 +08:00
khs1994
50babae2ce compose wordpress update mysql to v8.0.x #415 2019-08-31 22:11:34 +08:00
khs1994
afd66319e9 Update CI
* Update drone to v1.x
* Add GitHub Actions
2019-08-31 21:15:51 +08:00
khs1994
534f690e1b Update install 2019-08-31 18:35:14 +08:00
khs1994
d2f1945e46 Update project docker image name #416 2019-08-31 17:47:38 +08:00
Kang Huaishuai
e068ca908e Merge pull request #417 from 00Kai0/english
Update `why.md`
2019-08-30 14:58:14 +08:00
Kerwin.Sun
b12daf3ba5 why.md 2019-08-30 14:50:51 +08:00
Kang Huaishuai
ac3d9a2620 Merge pull request #413 from baijunyao/master
Use aliyun compose mirrors
2019-08-14 22:06:45 +08:00
baijunyao
99d0336adc Use aliyun compose mirrors 2019-08-14 21:50:30 +08:00
Kerwin.Sun
6c1f32f408 trans introduction--why 2019-08-11 18:49:23 +08:00
Kang HuaiShuai
4f462000ba Add image
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-07-03 12:22:22 +08:00
Kang HuaiShuai
3c79652b5e Fix dead link
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-07-03 12:06:31 +08:00
Kang HuaiShuai
6e92eaefd0 Update compose django, Fixed #405
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-07-03 11:49:11 +08:00
khs1994
1a5c0dedaa Merge pull request #407 from yongchengzhao/master
- Fix issue #406: Describe more correctly.
2019-06-28 11:20:06 +08:00
khs1994
a4ea0e5956 Merge pull request #409 from yongchengzhao/master
- Fix issue #408: Fix typos.
2019-06-28 11:17:28 +08:00
yongchengzhao
b4df39ada9 - Fix issue #408: Fix typos. 2019-06-28 10:16:12 +08:00
yongchengzhao
c95147f7c2 - Fix issue #408: Fix typos. 2019-06-28 10:04:57 +08:00
yongchengzhao
98dfbc7023 - Fix issue #406: Describe more correctly. 2019-06-27 17:03:03 +08:00
khs1994
42b45543d9 Add ci icon [skip ci] 2019-05-14 00:29:12 +08:00
khs1994
6eb566867e Update SUMMARY 2019-05-14 00:17:11 +08:00
khs1994
b4e936f021 Update README [skip ci] 2019-05-13 23:43:29 +08:00
khs1994
bf75b29746 Update gitbook settings 2019-05-13 23:41:43 +08:00
khs1994
9c3da09d9c Update travis ci settings 2019-05-13 23:06:39 +08:00
khs1994
12623a4c2a Merge pull request #402 from 00Kai0/english
trans introduction's README.md and what.md
2019-05-13 23:02:09 +08:00
khs1994
c56a8dcbbb Fix gitbook build error: use page-treeview@2.9.8 2019-05-13 22:58:26 +08:00
00kai0
1e3132aec9 trans introduction's README.md and what.md 2019-05-13 15:34:13 +08:00
khs1994
04e4e876dd Update cloud 2019-05-12 10:14:00 +08:00
khs1994
8af712b31c [install] Update mirror: remove docker cn registry #370 2019-05-12 09:44:17 +08:00
khs1994
d69ac403a7 Update cloud 2019-05-12 09:41:35 +08:00
khs1994
dd7f790bdf Update jd link [skip ci] 2019-05-10 07:27:55 +08:00
khs1994
8c039cee61 Buy book by wechat miniprogram [skip ci] 2019-05-07 23:16:36 +08:00
Baohua Yang
4cd6454451 Merge branch 'master' of github.com:yeasy/docker_practice 2019-05-05 19:31:08 +08:00
Baohua Yang
336f009c78 Add resource 2019-05-05 19:31:06 +08:00
khs1994
47585407d5 ubuntu 14.04,debian 7 and 8 EOL 2019-04-29 09:29:46 +08:00
khs1994
0b04aaf1b7 Merge pull request #399 from SmallTianTian/patch-1
expose port.
2019-04-15 20:22:09 +08:00
SmallTianTian
64af6dd220 expose port. 2019-04-15 11:11:58 +08:00
khs1994
51be1ec2e7 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
84194452f0 show repo language is go 2019-03-22 10:35:29 +08:00
khs1994
73deb22113 Update README
* use jd.com cps url, analysis docker user trend
2019-03-09 11:16:27 +08:00
khs1994
713a2400a4 Fix format and update outdate content 2019-03-08 12:21:07 +08:00
Baohua Yang
ee4f7f6187 Merge pull request #388 from daixiang0/delete-blank
Remove unused blank spaces
2019-02-22 23:44:13 +08:00
Xiang Dai
fcbce67238 delete all duplicate empty blanks
Signed-off-by: Xiang Dai <764524258@qq.com>
2019-02-21 10:53:33 +08:00
khs1994
24399a1ede Replace http with https 2019-01-06 10:15:13 +08:00
khs1994
57b091b0db Update install 2019-01-06 10:00:38 +08:00
khs1994
deeb1356f0 Update docker official docs link 2019-01-06 09:50:03 +08:00
khs1994
51cb8b485a Update link 2019-01-06 09:40:31 +08:00
khs1994
2d3785ccea Add aliyun mirror 2019-01-01 17:59:58 +08:00
khs1994
0357f396c5 replace crlf,Fix #338 2019-01-01 10:30:49 +08:00
khs1994
ac192efc26 Update typeset 2018-12-31 16:09:34 +08:00
khs1994
18aef8ba58 Add cases/ci travis
Signed-off-by: khs1994 <khs1994@khs1994.com>
2018-12-31 15:57:44 +08:00
khs1994
925d93947a Update dockerfile format 2018-12-31 14:50:31 +08:00
khs1994
84959ae8b4 Add Dockerfile multi stage laravel 2018-12-31 14:39:26 +08:00
khs1994
73ccb16b21 Add php image 2018-12-31 09:25:33 +08:00
khs1994
d29d8567f1 Update kubernetes 2018-12-31 09:06:28 +08:00
khs1994
9dc659109c Update fedora.md 2018-12-30 17:43:34 +08:00
khs1994
82b09d7da7 Fix last commit error 2018-12-26 16:47:44 +08:00
Baohua Yang
8ee24dcf28 Add more debug skills 2018-12-26 10:11:42 +08:00
Baohua Yang
c179ba5f1d Add debug skills 2018-12-26 10:05:42 +08:00
khs1994
3b65773b76 Fix image link 404 2018-12-25 19:20:32 +08:00
khs1994
8f26e9cb4b Merge pull request #385 from jxlwqq/patch-1
Fix CentOS website
2018-12-22 00:08:19 +08:00
jxlwqq
479720b658 Fix CentOS website 2018-12-22 00:04:50 +08:00
khs1994
a71aaf29ea Update debian to stretch 2018-12-19 17:27:21 +08:00
khs1994
ba3668b19e Update ubuntu to 18.04 2018-12-19 17:24:52 +08:00
khs1994
a4227497d4 Fix #383, base image not include wget,Update based image to debian:stretch 2018-12-19 17:08:32 +08:00
xufanglu
c9ab9af8da Use daemon.json 2018-12-18 13:13:52 +08:00
khs1994
8b414cf2f5 Update soft version 2018-12-15 23:04:32 +08:00
khs1994
e0e8c0c528 replace docker cloud with docker hub 2018-12-14 19:36:17 +08:00
khs1994
657753c59c replace docker store with docker hub 2018-12-14 19:08:14 +08:00
khs1994
b4c958b458 Update format 2018-12-13 20:51:30 +08:00
khs1994
df27a079ee Merge pull request #380 from daixiang0/update-faq
Update stop cmd
2018-12-13 19:24:00 +08:00
daixiang0
4dcd1800a7 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
47599f3b42 Update data root info 2018-12-13 18:57:41 +08:00
long
6907b24acd Update docker save command info
Signed-off-by: daixiang0 <764524258@qq.com>
2018-12-13 18:13:08 +08:00
khs1994
46b70102da Update storage drivers #378 #375 2018-12-13 18:01:45 +08:00
khs1994
bcc2100566 Merge pull request #374 from mapleeit/patch-1
fix: fix typos
2018-12-11 14:41:27 +08:00
Maple Miao
c6c1c41de9 fix: fix typos 2018-12-11 14:30:59 +08:00
Devin-Li
4cb7a633ea update entrypotin.md 2018-12-10 18:20:10 +08:00
khs1994
75ac38a92f Update ubuntu version to 18.04
Signed-off-by: khs1994 <khs1994@khs1994.com>
2018-12-08 21:48:16 +08:00
Baohua Yang
00e3f2ecbb Merge pull request #371 from yeasy/miniprogram
Add wechat mini-program info
2018-12-08 21:12:30 +08:00
khs1994
e9a50dbaed Add miniprogram 2018-12-08 18:08:27 +08:00
khs1994
abd0871f5d Update Dockerfile
Signed-off-by: khs1994 <khs1994@khs1994.com>
2018-11-02 08:26:50 +08:00
khs1994
66525a1008 Update supported os
Signed-off-by: khs1994 <khs1994@khs1994.com>
2018-11-02 08:01:29 +08:00
Baohua Yang
de11e5a71c Fix issue#362: update book info 2018-10-23 21:35:18 +08:00
khs1994
d573a4bb98 Merge pull request #364 from wxy325/master
Update django.md, Fix a typo
2018-10-23 12:51:54 +08:00
Xiangyu Wu
d0f693ac09 Update django.md
Fix typo
2018-10-22 15:25:40 -07:00
khs1994
a4966685d6 Next version is 1.0.0 2018-10-21 09:51:36 +08:00
khs1994
fe7d877928 Add Fedora 2018-10-21 09:43:53 +08:00
khs1994
fa688567f8 Merge pull request #359 from mahuihuang/fix-etcd 2018-09-14 16:50:51 +08:00
Ma Huihuang
e668b0650f 添加环境变量
`No help topic for 'put'·
2018-09-14 16:42:45 +08:00
khs1994
9e1c34ac05 Merge pull request #358 from ujnzxw/master
fix typos
2018-09-08 11:10:35 +08:00
Xiaowei ZHAO
b76041a196 fix typos 2018-09-08 02:24:38 +00:00
khs1994
a2ff8fe137 Merge pull request #357 from LeonGravel/patch-1
fix typo
2018-09-06 22:08:40 +08:00
LeonGravel
765608859c fix typo 2018-09-06 14:43:10 +08:00
khs1994
4786b7361e Fix wordpress compose file volume format 2018-08-25 22:20:04 +08:00
khs1994
b6e61560a8 Update issue link 2018-08-14 09:30:08 +08:00
khs1994
49efe1ec18 Update Ubuntu LTS version to 18.04, Fix #352 2018-08-05 08:04:49 +08:00
khs1994
cd18dd6d2c Change Docker CE update channels #351 2018-07-20 09:37:22 +08:00
康怀帅
8376f148da CA should put client host folder 2018-07-11 08:13:17 +08:00
康怀帅
1c616bdf35 Fix registry tls error 2018-07-10 12:28:18 +08:00
khs1994
90679ffc79 Update demo image version 2018-07-10 08:09:43 +08:00
khs1994
cfdd25b1c8 Update etcd 2018-07-10 08:08:34 +08:00
khs1994
0da469f02d Remove -v description 2018-07-10 08:08:21 +08:00
khs1994
e70adfcd4a Update install 2018-07-10 08:07:31 +08:00
康怀帅
9477378eab Remove aliyun daocloud 2018-06-28 11:15:25 +08:00
Baohua Yang
31db05403c Merge pull request #347 from Tuvie/master
Fix mismatch between outline and title
2018-06-21 13:59:56 +08:00
Li Zhaogeng
5d1bdcafaa Fix a dismatch between table of contents and contents 2018-06-21 11:46:41 +08:00
康怀帅
31fcbbeb56 Update README.md 2018-06-03 21:41:17 +08:00
康怀帅
8b1ac33eb0 Update Docker version [skip ci] 2018-06-03 21:39:52 +08:00
康怀帅
0656f8c923 Merge pull request #344 from edxi/patch-1
host file
2018-06-03 21:34:51 +08:00
Xi ErDe
880edd95d1 host file 2018-06-03 21:28:31 +08:00
denwork
780343a09d Create nexus3_registry.md 2018-05-31 18:30:41 +08:00
Baohua Yang
34ef7be800 Merge pull request #339 from khs1994-docker/master
Update Swarm mode: add rolling_update
2018-05-23 22:54:33 +08:00
康怀帅
412187b40d 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
aaf791020e Update Swarm mode: add rolling_update 2018-05-23 17:18:42 +08:00
康怀帅
cce126e057 Update raspberry-pi content Fix #337 2018-05-10 08:09:39 +08:00
康怀帅
86c7042557 Change docker rmi TO docker image rm #279 2018-05-09 19:45:51 +08:00
Baohua Yang
3bc4fc7770 Update gitbook link 2018-05-07 16:42:04 +08:00
Baohua Yang
97a1517cf9 Update gitbook read link 2018-04-29 15:46:38 +08:00
Shude Li
91d875913c doc(compose_file): fix version number of secrets (#332) 2018-04-22 09:04:30 -07:00
康怀帅
aea908985b Merge pull request #330 from songjiayang/master
fix typo
2018-04-17 19:08:53 +08:00
songjiayang
6fa19cde0e fix typo 2018-04-17 17:40:50 +08:00
康怀帅
6cf0b4e528 Merge pull request #329 from khs1994-docker/master
Remove deprecated content
2018-04-08 21:03:00 +08:00
khs1994
f8a0550c89 Remove deprecated content 2018-04-08 21:00:11 +08:00
康怀帅
2f3a4490f1 Merge pull request #327 from khs1994-docker/master
Add some file
2018-04-08 20:36:47 +08:00
khs1994
a79d139a17 Add some file 2018-04-08 01:06:53 +08:00
康怀帅
abd907d0df Update docker version 2018-03-31 19:22:16 +08:00
康怀帅
6024b8cc96 Merge pull request #326 from Alex-WZ/patch-1
Update concepts.md
2018-03-31 15:39:59 +08:00
Alex-WZ
12ee584895 Update concepts.md
知道容器的生命周期结束或者其被删除 -> 直到容器的生命周期结束或者其被删除
2018-03-31 14:36:42 +08:00
Baohua Yang
99fdb25307 Merge pull request #324 from thomaszdxsn/patch-1
Fix a typo
2018-03-30 21:58:35 +08:00
Yang,Zhou
87bc804730 fix a typo 2018-03-30 20:55:02 +08:00
康怀帅
eba11c1783 Fix docker login docker ce 18.04-rc1+
* https://docs.docker.com/engine/reference/commandline/login/
2018-03-30 10:04:01 +08:00
康怀帅
cef57e5e1d Merge pull request #323 from YL2014/master
Fix 文字错误 拉去 -> 拉取
2018-03-22 13:04:46 +08:00
yl2014
488f94f132 Fix 文字错误 拉去 -> 拉取 2018-03-22 12:31:35 +08:00
Baohua Yang
02449d056f Minor update expression 2018-03-21 14:59:25 +08:00
康怀帅
6c92d41c0f Update Contents
* Fix offlineread docker image

* Add warning on install

* Update install follow official
2018-03-19 16:04:23 +08:00
康怀帅
c706769a44 Merge pull request #321 from khs1994/master
Update Dockerfile multistage-builds #320
2018-03-10 09:18:54 +08:00
khs1994
b8aeb4816e Update Dockerfile multistage-builds #320 2018-03-10 09:16:43 +08:00
康怀帅
fff9b8acd2 Update Compose README
Remove cluster
2018-03-10 08:45:09 +08:00
康怀帅
7194afe014 Merge pull request #319 from khs1994/master
Update Swarm mode create #302
2018-03-10 08:36:20 +08:00
khs1994
51fb449877 Update Swarm mode create #302 2018-03-10 08:34:46 +08:00
康怀帅
bb65fe17be Merge pull request #316 from khs1994/master
Update install
2018-03-08 08:25:55 +08:00
khs1994
749e8cceb7 Update install 2018-03-08 08:23:35 +08:00
khs1994
d677384474 Update macOS mirror #313 2018-02-10 18:00:14 +08:00
康怀帅
473f90d087 Update offline read
Update offline read  (#312)
2018-01-23 21:52:14 +08:00
康怀帅
cfd6d4a112 Merge pull request #309 from khs1994/master
Change command docker ps to docker container ls
2018-01-16 16:31:05 +08:00
khs1994
a2de8f8195 Change command docker ps to docker container ls #279 2018-01-15 22:00:53 +08:00
康怀帅
9289d02b42 Remove content 2018-01-15 09:21:09 +08:00
康怀帅
10818a6990 Update QQ Group status 2018-01-13 00:38:30 +08:00
康怀帅
93822bc05f Update ISSUE_TEMPLATE.md 2018-01-13 00:34:33 +08:00
康怀帅
ea9ed043d2 Update offline 2018-01-05 19:00:22 +08:00
康怀帅
447f104059 Merge pull request #308 from khs1994/master
Update gitbook
2018-01-04 16:18:49 +08:00
khs1994
d2986c5a5f Update README.md about download pdf and epub [skip ci] 2018-01-04 16:16:09 +08:00
khs1994
d252fef1fc Add cover in root 2018-01-04 15:41:34 +08:00
康怀帅
379aa783c3 Fix git url error 2018-01-03 01:08:24 +08:00
Baohua Yang
93c1947770 Merge pull request #306 from khs1994/master
Release v0.9.0
2017-12-31 21:10:11 +08:00
khs1994
4f1c35cf98 Release v0.9.0 2017-12-31 14:35:48 +08:00
khs1994
26ce09cc6f Update faq 2017-12-31 14:27:55 +08:00
khs1994
606f30631e Update appendix repo wordpress 2017-12-31 14:26:03 +08:00
khs1994
519eea1e60 Change debian to alpine 2017-12-31 14:20:04 +08:00
khs1994
9707b94b9e Fix spelling error 2017-12-31 10:33:52 +08:00
khs1994
f7b8786729 Update project docker image Dockerfile 2017-12-31 10:30:53 +08:00
khs1994
c350c18a01 Add shell script for offline read 2017-12-31 10:29:51 +08:00
Baohua Yang
b1967a8da0 Update introduction and read links 2017-12-31 09:44:51 +08:00
康怀帅
0b7ba611a2 Fix spelling error 2017-12-29 09:22:07 +08:00
康怀帅
9838658e69 Merge pull request #303 from shawxr/patch-1
Update bind-mounts.md
2017-12-26 16:13:52 +08:00
康怀帅
2791c6498c Update bind-mounts.md 2017-12-26 16:12:28 +08:00
shawxr
4e4dc5393b Update bind-mounts.md 2017-12-26 16:05:26 +08:00
Baohua Yang
d230ecfe1f Merge pull request #300 from khs1994/master
Update content
2017-12-25 21:12:58 +08:00
康怀帅
b1b3542406 Update advanced_network 2017-12-20 23:49:49 +08:00
khs1994
319202af07 Update volume 2017-12-20 23:46:55 +08:00
khs1994
882a0e226d Update registry 2017-12-20 23:46:46 +08:00
khs1994
6b421a351b Update image 2017-12-20 23:45:25 +08:00
khs1994
297bd84cac Update swarm mode 2017-12-20 23:44:38 +08:00
khs1994
f479e606a4 Add tips #265 2017-12-20 23:44:09 +08:00
Baohua Yang
35b144058c Merge pull request #299 from khs1994/master
Update mesos/framework.md
2017-12-20 21:37:17 +08:00
khs1994
ff69022065 Update install 2017-12-20 10:24:36 +08:00
khs1994
4a8f23dc44 Update mesos/framework.md 2017-12-20 10:14:53 +08:00
康怀帅
e24cd4c791 Update framework.md 2017-12-19 18:11:08 +08:00
康怀帅
3014b1f6d9 Merge pull request #298 from ysykzheng/master
fix link
2017-12-19 18:10:02 +08:00
康怀帅
45939f9334 Update framework.md 2017-12-19 18:08:52 +08:00
ysykzheng
7886c92413 fix link 2017-12-19 16:33:37 +08:00
Baohua Yang
800f33a266 Merge pull request #297 from khs1994/master
User docker exec to enter container
2017-12-18 16:44:42 +08:00
khs1994
f6757c9310 Remove some content in data_management 2017-12-17 23:02:42 +08:00
khs1994
2f49433315 Rename enter.md to attach_exec.md 2017-12-17 22:57:11 +08:00
Baohua Yang
346da872f9 Merge pull request #296 from khs1994/master 2017-12-17 13:39:32 +08:00
khs1994
5cbb033801 Update compose 2017-12-16 15:08:02 +08:00
康怀帅
7bc34cefe5 Update content (#294) 2017-12-16 13:56:57 +08:00
Baohua Yang
a866b5950e Merge pull request #292 from khs1994/master 2017-12-13 10:44:19 +08:00
khs1994
2069026265 Add registry auth TLS #180 2017-12-11 20:22:51 +08:00
khs1994
c9c7ef0023 Fix error:secret to config 2017-12-11 17:44:48 +08:00
Baohua Yang
aeed2026ea Merge pull request #291 from khs1994/master 2017-12-10 15:09:26 +08:00
khs1994
7e24a78fc4 Update install: add logout and login user after install 2017-12-10 13:21:52 +08:00
khs1994
8678c04263 Update docker-compose.yml 2017-12-10 12:53:57 +08:00
khs1994
0dd94bc130 Update book.json [skip ci] 2017-12-10 12:41:08 +08:00
khs1994
5cf854172e Update cloud: add images 2017-12-10 12:19:24 +08:00
khs1994
dff0e69a0a Update compose #288 2017-12-10 11:52:09 +08:00
khs1994
605835541f Remove img 2017-12-10 11:00:24 +08:00
khs1994
1d9837c504 Move DNS to network #278 2017-12-10 10:51:40 +08:00
Baohua Yang
503b73895d Merge pull request #290 from khs1994/master
Release v0.9-rc2: remove unused files
2017-12-09 20:05:20 +08:00
khs1994
df6ef83a14 Update install docker 2017-12-09 00:12:30 +08:00
khs1994
590ccb1031 Update install docker 2017-12-09 00:12:02 +08:00
khs1994
71cb5b3316 Release v0.9-rc2 2017-12-08 23:32:53 +08:00
khs1994
d6e2b4f700 Remove useless file _local 2017-12-08 23:19:20 +08:00
khs1994
2a32ead0ca Add linuxkit #287 2017-12-08 23:01:04 +08:00
khs1994
1f018be085 Remove useless file 2017-12-08 23:00:19 +08:00
Baohua Yang
e88f293eb4 Merge pull request #286 from khs1994/master
Update content
2017-12-08 22:33:58 +08:00
khs1994
d61018603e Add docker config Only Swarm mode #283 2017-12-08 19:15:27 +08:00
Baohua Yang
d95fcea6df Fix MacOS to macOS 2017-12-08 18:58:19 +08:00
Baohua Yang
26c8f243ee Update ISSUE_TEMPLATE.md 2017-12-07 10:18:24 +08:00
khs1994
fc8a203b1e Update CONTRIBUTING.md 2017-12-06 21:43:01 +08:00
khs1994
205ffcf1e4 Add git cn mirror #276 2017-12-06 19:50:49 +08:00
khs1994
fbd05d6b8c Fix error in jekyll: NOT INCLUDE _images 2017-12-06 19:30:57 +08:00
khs1994
1920ec4d71 Add Best practices for writing Dockerfiles 2017-12-06 19:29:09 +08:00
khs1994
47da90ddb7 Add docker secret #285 2017-12-06 13:23:22 +08:00
Baohua Yang
d364cc4565 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
772d02b5ec Add docker-library/docs in dockerfile/references.md 2017-12-05 13:04:01 +08:00
khs1994
ea9abbff99 Change revision.md to CHANGELOG.md AND Move CONTRIBUTING.md to root 2017-12-05 12:36:26 +08:00
khs1994
4790993613 Change revision.md to CHANGELOG.md AND Move CONTRIBUTING.md to root 2017-12-05 11:33:33 +08:00
khs1994
3dd42fbdf8 Update revision 2017-12-05 11:16:51 +08:00
khs1994
9dec811c7c Update: #279 2017-12-05 11:15:59 +08:00
khs1994
12c83989de Update Registry AND #279 2017-12-05 11:15:24 +08:00
khs1994
d56e562eb6 Update container:Change docker images TO docker image ls #279 2017-12-05 11:14:56 +08:00
khs1994
db71f822a2 Update network:Change --net TO --network 2017-12-05 11:03:39 +08:00
Baohua Yang
e5267d3754 Merge pull request #281 from khs1994/master
Update container image chapter
2017-12-05 10:19:08 +08:00
Baohua Yang
e0f501b0eb Merge pull request #280 from khs1994/master
Fix #278: Update SUMMARY
2017-12-05 09:48:34 +08:00
khs1994
77009b25b7 Update image:Change docker images TO docker image ls,etc #279 2017-12-05 09:40:50 +08:00
khs1994
cefc523e7e Update container:Change docker ps TO docker container ls,etc #279 2017-12-05 09:22:06 +08:00
khs1994
0302445b0d Update SUMMARY #278 2017-12-04 20:49:59 +08:00
Baohua Yang
414546cc85 Merge pull request #277 from khs1994/master 2017-12-04 20:36:38 +08:00
khs1994
a01f6f5c94 Update .github 2017-12-04 11:49:59 +08:00
khs1994
3c95b69ba1 Update book.json 2017-12-04 11:34:47 +08:00
khs1994
9d7e5140c8 Update machine in swarm 2017-12-04 11:34:28 +08:00
Baohua Yang
b5ad19eac8 Merge pull request #274 from khs1994/master 2017-12-03 23:02:12 +08:00
khs1994
96b4026c94 Update etcd 2017-12-03 18:53:35 +08:00
khs1994
49865efb17 Update machine 2017-12-03 18:26:10 +08:00
khs1994
16b9b51e4a Update SUMMARY revision 2017-12-03 14:34:21 +08:00
khs1994
7187ca598e Update machine 2017-12-03 14:33:46 +08:00
khs1994
e6095decdb Update etcd 2017-12-03 14:04:03 +08:00
khs1994
2f175d81a5 Update etcd to 3.x #275 2017-12-03 13:57:02 +08:00
khs1994
b432fe6b4f Update CoreOS 2017-12-03 13:51:34 +08:00
khs1994
b11481a16c Fix spelling error 2017-12-03 10:31:28 +08:00
khs1994
03d3ab0897 Remove links in compose #215 2017-12-03 10:28:35 +08:00
khs1994
164bfd671a Update install mirror 2017-12-03 10:27:36 +08:00
khs1994
d32dfb21d7 Update repository 2017-12-03 10:27:22 +08:00
khs1994
9c6dc3b7c3 Update image 2017-12-03 10:27:05 +08:00
khs1994
5c4b6c095d Update bind-mounts 2017-12-03 10:26:48 +08:00
khs1994
72962ca829 Update basic_concept 2017-12-03 10:26:28 +08:00
Baohua Yang
7c54647512 Merge pull request #273 from khs1994/master 2017-12-02 08:12:05 +08:00
khs1994
c0045f987c Update cases os 2017-12-01 23:23:26 +08:00
Baohua Yang
421c0b55e3 Merge pull request #272 from khs1994/master
Fix #270: docker daemon deprecated
2017-12-01 22:35:12 +08:00
khs1994
dc6f9c164e Update etcd 2017-12-01 17:33:15 +08:00
khs1994
6591f00635 Update image 2017-12-01 17:33:05 +08:00
khs1994
850cee304d Update cases os 2017-12-01 17:32:53 +08:00
khs1994
ca5b5e088a Update appendix 2017-12-01 17:32:39 +08:00
Baohua Yang
9a403a5e7d Merge pull request #271 from khs1994/master
Update k8s content
2017-12-01 17:29:23 +08:00
khs1994
cd9134842b Fix #270 docker daemon deprecated 2017-12-01 16:50:45 +08:00
Baohua Yang
ce228cf0ae Merge pull request #269 from khs1994/master
Update registry
2017-12-01 16:43:19 +08:00
khs1994
8c882ae593 Fix copywriting in k8s 2017-12-01 16:32:42 +08:00
khs1994
43b9d80b87 Update registry 2017-12-01 15:46:26 +08:00
Baohua Yang
9c8e8429af Add using issue 2017-11-30 23:06:37 +08:00
康怀帅
824d1f96ca Update compose install (#267)
* Update drone

* Update compose install
2017-11-30 08:38:35 -06:00
Baohua Yang
ca1ebd12f3 Add step for reviewing 2017-11-30 22:03:03 +08:00
康怀帅
d4d7d852f0 Update Drone demo 2017-11-30 18:34:14 +08:00
khs1994
73c889a379 Fix error link in install machine 2017-11-30 18:28:23 +08:00
khs1994
aa5e16040b Update linking 2017-11-30 18:22:16 +08:00
khs1994
3608d55710 Update Docker Registry 2017-11-30 16:59:04 +08:00
khs1994
3fff07037f Update install 2017-11-30 15:57:27 +08:00
康怀帅
b14db127e1 Merge pull request #264 from khs1994/master
Add Drone chinese resources AND Fix error links
2017-11-30 01:39:30 -06:00
khs1994
dbce8bf068 Update Drone #261 2017-11-30 15:28:53 +08:00
khs1994
77aec42d49 Add Drone #261 2017-11-30 15:05:57 +08:00
khs1994
a9359e51d3 Add chinese docker resources 2017-11-30 15:05:32 +08:00
khs1994
3b4e195983 Fix links 2017-11-30 15:04:49 +08:00
康怀帅
c5d6e3fdfc Add qq group x 2017-11-29 20:04:21 +08:00
康怀帅
58fd53813e Add gitter 2017-11-29 19:32:50 +08:00
康怀帅
78dd280dc5 Merge pull request #258 from auroraeffect/master
Fix MongoDB version error in compose
2017-11-29 05:18:10 -06:00
liu sicong
c627b487b0 Merge pull request #1 from auroraeffect/auroraeffect-patch-version-error
Fix MongoDB version error
2017-11-29 17:20:47 +08:00
liu sicong
f2fcf42875 Fix MongoDB version error
3.0 => 3.2
2017-11-29 17:19:25 +08:00
khs1994
8e1a1d183b Remove fleet #222 2017-11-29 15:39:06 +08:00
khs1994
f9b23b757f Release v0.9-rc1 2017-11-29 10:49:36 +08:00
khs1994
7fb504457e Update docker-compose.yml 2017-11-29 10:35:57 +08:00
khs1994
13dcfb99ee Change picture links in README.md 2017-11-29 10:35:36 +08:00
khs1994
858ee68d23 Add picture from docs.docker.com 2017-11-29 10:25:19 +08:00
khs1994
a877c87310 Update install 2017-11-29 10:24:44 +08:00
khs1994
f8699bac64 Update container 2017-11-29 10:24:32 +08:00
khs1994
3d8aee7bf8 Update compose 2017-11-29 10:24:19 +08:00
khs1994
31507a513a Fix error link 2017-11-29 10:24:02 +08:00
khs1994
9fb1796c50 Update advanced_network 2017-11-29 10:23:42 +08:00
康怀帅
58801290c7 Update offline read in Windows: fix error in Docker CE LCOW (Permission denied) (#257) 2017-11-28 02:19:39 -06:00
康怀帅
7b79f0da00 Update docker-compose.yml 2017-11-28 15:35:51 +08:00
康怀帅
6ef750b04e Add travis CI/CD #196 #254 (#256)
Add travis CI/CD #196 #254
2017-11-27 23:38:13 -06:00
khs1994
4dab525093 Fix error in docker-compose.yml 2017-11-28 12:05:00 +08:00
khs1994
a00fd6de61 Change offline read way Who use Windows 2017-11-28 11:59:21 +08:00
康怀帅
3cc6c917d0 Fix copywriting 2017-11-27 16:16:44 +08:00
康怀帅
255ab88a73 Merge pull request #253 from yeasy/dev
Update content
2017-11-27 02:15:13 -06:00
khs1994
a78c88c6af Fix copywriting 2017-11-27 14:31:01 +08:00
khs1994
5400402299 Change link 2017-11-27 14:29:33 +08:00
khs1994
a4759c6829 Update image 2017-11-27 14:29:13 +08:00
khs1994
5b4bdf0041 Update basic_concept 2017-11-27 14:29:00 +08:00
khs1994
72da9d6003 Update SUMMARY.md 2017-11-27 14:28:41 +08:00
khs1994
3e346dd3ca Fix spelling error 2017-11-27 14:28:20 +08:00
khs1994
13a6ce4189 Update content 2017-11-26 11:28:55 +08:00
khs1994
d4037fae18 Update ufs 2017-11-26 10:38:07 +08:00
康怀帅
d363f31834 Merge pull request #249 from yeasy/dev
Add Swarm mode AND Fix content
2017-11-25 20:19:16 -06:00
khs1994
48a092beb5 Update underly 2017-11-26 10:18:24 +08:00
khs1994
b1dd38a146 Add OverlayFS #250 2017-11-26 10:06:57 +08:00
khs1994
7a0078b5d4 Update Swarm mode overview 2017-11-26 09:57:48 +08:00
khs1994
5f357b3ad6 Update Swarm mode 2017-11-26 09:54:16 +08:00
khs1994
ef3b0a5077 Update compose 2017-11-26 09:54:04 +08:00
khs1994
78dcf011e8 Update book.json ADD github link SET language 2017-11-25 23:16:43 +08:00
khs1994
1c8d9156aa Update Swarm mode 2017-11-25 15:43:51 +08:00
Baohua Yang
d8b30bc3de Simplify content 2017-11-25 14:17:45 +08:00
khs1994
32573f050a Update Swarm mode create 2017-11-25 10:27:27 +08:00
khs1994
32c65adc48 Add Swarm mode deploy 2017-11-25 10:26:58 +08:00
khs1994
17f7c101a8 Add Swarm mode README 2017-11-25 09:57:16 +08:00
康怀帅
97dca1525b Merge pull request #247 from yeasy/dev
Add multistage builds
2017-11-24 19:45:30 -06:00
khs1994
b62f468468 Add Swarm mode overview 2017-11-25 09:45:16 +08:00
khs1994
16d37d285c Add Swarm mode create 2017-11-25 09:43:04 +08:00
khs1994
1cebe22263 Remove english 2017-11-25 09:28:28 +08:00
khs1994
8c28805e64 Fix #245 2017-11-24 22:42:49 +08:00
khs1994
7db64e34e4 Update content 2017-11-24 22:42:17 +08:00
khs1994
fcfc126446 Add multistage builds #226 2017-11-24 18:39:59 +08:00
khs1994
cf409b0318 Add multistage builds #226 2017-11-24 18:37:38 +08:00
khs1994
1c87565d1a Add multistage builds #226 2017-11-24 18:36:30 +08:00
康怀帅
a5baa245a1 Fix table 2017-11-24 16:50:25 +08:00
康怀帅
b699ec3970 Merge pull request #246 from yeasy/dev
Update content
2017-11-24 02:46:41 -06:00
khs1994
802b51b411 Fix #20 2017-11-24 12:32:36 +08:00
khs1994
68d0468801 Update install 2017-11-24 12:31:12 +08:00
khs1994
8292b693f4 Update image 2017-11-24 12:30:57 +08:00
khs1994
e486686bcf Update container 2017-11-24 12:30:38 +08:00
khs1994
655e513e29 Update data management 2017-11-24 12:30:18 +08:00
khs1994
dcc3d1ae77 Update .github 2017-11-24 11:31:22 +08:00
khs1994
6e45995412 Update revision.md 2017-11-24 11:19:59 +08:00
khs1994
b2fb0e346c Update offline read wiki link 2017-11-24 11:07:21 +08:00
康怀帅
69d619c88d Merge pull request #244 from yeasy/dev
Update appendix/repo #230
2017-11-24 10:56:13 +08:00
康怀帅
4b1859b1f1 Remove SSH 2017-11-24 10:32:39 +08:00
khs1994
9555a6f570 Update appendix/resources 2017-11-24 10:27:39 +08:00
khs1994
e36c307923 Update appendix/repo 2017-11-24 10:19:15 +08:00
康怀帅
8a24edd474 Merge pull request #243 from yeasy/dev
Update install AND FAQ
2017-11-24 10:17:47 +08:00
khs1994
92aed4265c Update FAQ 2017-11-24 09:56:30 +08:00
khs1994
cbc68af6bb Update install content AND Add raspberry-pi 2017-11-24 09:51:06 +08:00
khs1994
131e2f3c94 Update FAQ 2017-11-24 00:29:51 +08:00
康怀帅
83f3ae88c6 Merge pull request #241 from yeasy/dev
Update content
2017-11-24 00:00:17 +08:00
khs1994
bd55b42ead Fix spelling error 2017-11-23 23:59:28 +08:00
khs1994
42b3787134 Fix spelling error 2017-11-23 23:48:52 +08:00
khs1994
e4fd7a7008 Fix spelling error 2017-11-23 23:38:05 +08:00
khs1994
149ce81da2 Remove CoreOS in cases/os 2017-11-23 23:31:47 +08:00
khs1994
469f0af172 Add docker exec #240 #191 #171 #164 #53 2017-11-23 22:30:37 +08:00
khs1994
82624d3501 Update Docker Compose commands 2017-11-23 22:08:41 +08:00
khs1994
f02196c27d Fix error 2017-11-23 21:35:13 +08:00
khs1994
6c7b27023c Add ico in README.md 2017-11-23 21:26:55 +08:00
khs1994
83faad1568 Update Docker Compose file format 3 2017-11-23 21:25:55 +08:00
khs1994
b6513e5525 Update Docker network 2017-11-23 21:25:42 +08:00
Baohua Yang
2e1edc8985 Merge pull request #239 from yeasy/dev 2017-11-23 18:22:15 +08:00
康怀帅
aa0f5afad8 Merge pull request #237 from yeasy/dev
Add compose in network/linking.md
2017-11-23 15:50:11 +08:00
khs1994
c6e8f24e12 Update Docker Compose file format 3 2017-11-23 15:48:52 +08:00
khs1994
225f45c3bd Add compose in network/linking.md 2017-11-23 12:59:13 +08:00
khs1994
b39862ac74 Remove Docker Swarm 2017-11-23 10:56:12 +08:00
khs1994
dd91397ed6 Update README.md 2017-11-23 10:55:12 +08:00
康怀帅
25415c2b52 Merge pull request #236 from yeasy/dev
Remove Docker Swarm,etc
2017-11-23 10:50:25 +08:00
khs1994
38278731f5 Update network remove --link #215 2017-11-23 10:42:43 +08:00
khs1994
e14ff2c7a5 Update revision.md 2017-11-23 10:41:54 +08:00
Baohua Yang
23986bf8fe Update templates for github issue and pr 2017-11-23 09:59:40 +08:00
khs1994
7a3355a0fa Remove Docker Swarm 2017-11-23 09:57:43 +08:00
Baohua Yang
0d42c13818 Minor update description and review image
Fix #231: Update legacy branch name
2017-11-23 09:42:22 +08:00
康怀帅
539b9093dd Merge pull request #234 from yeasy/dev
merge dev branch
2017-11-23 08:05:24 +08:00
khs1994
6dbf69e9f2 Update machine 2017-11-23 01:35:38 +08:00
khs1994
13723b7f19 Update machine 2017-11-23 01:29:38 +08:00
khs1994
650897e17d Update machine 2017-11-23 01:27:16 +08:00
khs1994
cadd96d578 Update machine 2017-11-23 01:23:51 +08:00
khs1994
79cd81910d Update machine 2017-11-23 01:22:25 +08:00
khs1994
236ca1d6a5 Update data management #214 2017-11-23 00:22:03 +08:00
khs1994
6a5b2b398c Update data management #214 2017-11-23 00:19:30 +08:00
康怀帅
0309ff205d Merge pull request #232 from yeasy/dev
计划发布 0.9 版本,基于 Docker CE v17.09 Stable
2017-11-22 22:11:39 +08:00
khs1994
a70e9ea243 计划发布 0.9 版本,基于 Docker CE v17.09 Stable 2017-11-22 22:09:26 +08:00
康怀帅
7f156730ea Merge pull request #228 from yeasy/dev
Fix #227 #180
2017-11-22 21:09:32 +08:00
khs1994
881b6421c3 Remove Registry config.md #180 2017-11-22 21:07:49 +08:00
khs1994
d96135bd80 Update content #227 #180 2017-11-22 20:28:10 +08:00
khs1994
57a29ef76d Follow chinese-copywriting-guidelines #20 2017-11-22 11:41:14 +08:00
khs1994
3c5854670d Follow chinese-copywriting-guidelines #20 2017-11-22 11:36:18 +08:00
康怀帅
f6cb29e42f Merge pull request #225 from yeasy/dev
Fix #223
2017-11-22 11:23:42 +08:00
khs1994
3431d4245b Fix #223 2017-11-22 11:22:57 +08:00
康怀帅
3a43e09e03 Fix table error 2017-11-22 11:22:16 +08:00
康怀帅
69c65ee0fd Merge pull request #224 from yeasy/dev
Fix #117
2017-11-22 11:15:27 +08:00
khs1994
4891f3fb8f Fix #117 2017-11-22 11:13:23 +08:00
康怀帅
7dcf8129d5 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
68b4852827 Chang docker image in offline read 2017-11-22 10:10:36 +08:00
Baohua Yang
eb32acd810 Merge pull request #219 from khs1994/master
Fix #216 #218
2017-11-22 09:29:16 +08:00
khs1994
e5569a1776 Remove DockerPool content 2017-11-21 19:17:45 +08:00
康怀帅
17bd7de51f Fix #216 #218
Fix #216 #218
2017-11-21 19:05:06 +08:00
Baohua Yang
1278ea8260 Merge pull request #212 from khs1994/master
Fix code grammar indicator, update help docs
2017-11-14 11:16:53 +08:00
khs1994
1e916ea6cb Follow GitHub recommended community standards 2017-11-13 19:35:41 +08:00
khs1994
2476df00d8 Fix #206 #117 2017-11-13 18:54:38 +08:00
khs1994
5d5f6cf2ce Update image install content 2017-11-13 18:19:35 +08:00
Baohua Yang
cfcc278b86 Merge pull request #211 from khs1994/master
Update with latest content
2017-11-12 22:41:53 +08:00
khs1994
ed1fb29ba9 Fix error in daemon json 2017-11-01 15:50:44 +08:00
khs1994
9cf43a3aa0 Update content AND Use Docker official CN mirror in example 2017-11-01 15:47:41 +08:00
khs1994
e050af9b67 Update README.md 2017-11-01 15:15:12 +08:00
Baohua Yang
7198e22549 Merge pull request #204 from khs1994/master
Fix #203 #206 #208 #209
2017-10-31 19:11:08 -05:00
khs1994
9e09742386 Remove dockerfile in appendix #209 2017-11-01 00:36:57 +08:00
khs1994
2516f79986 Update cloud 2017-11-01 00:24:45 +08:00
khs1994
c309f061ec Update docker-compose 2017-11-01 00:20:30 +08:00
khs1994
424e583eed Remove sudo #206 AND Remove 「本地安装」「批量上传脚本」#208 2017-10-31 23:55:51 +08:00
khs1994
4a4dd3f7d5 Use 「docker container」 in docker v1.13+ #203 AND Remove sudo #206 2017-10-31 23:24:49 +08:00
khs1994
aa1e1d8453 Use 「docker image」 in docker v1.13+ 2017-10-24 13:06:50 +08:00
khs1994
e53e778e8d Add Docker Management Commands in docker v1.13+ 2017-10-24 12:30:17 +08:00
Baohua Yang
933da93481 Merge pull request #205 from LetianFeng/master
Fix typo: Dockrfile -> Dockerfile
2017-10-20 07:52:46 -05:00
Letian Feng
375121696f Fix 单词错误 Dockrfile -> Dockerfile 2017-10-20 11:09:52 +02:00
khs1994
0a98ae5b88 Remove outdated method and add new way in /etc/docker/daemon.json 2017-10-19 23:24:41 +08:00
khs1994
2f7a271261 Add please use latest docker (v17.10.0) 2017-10-19 23:22:55 +08:00
khs1994
97eab3046a Fix error links 2017-10-19 22:46:23 +08:00
khs1994
028a66a4f3 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
7d5b893af7 Merge pull request #202 from khs1994/master
Fix links
2017-09-16 10:49:07 +08:00
khs1994
d9a26df6a3 Fix links 2017-09-16 10:27:27 +08:00
Baohua Yang
1bfc58ebd7 Set theme jekyll-theme-slate 2017-09-11 15:44:34 +08:00
Baohua Yang
b72dc44d7b Merge pull request #199 from khs1994/master
Fix #186: Refine installation
2017-09-05 22:00:31 +08:00
khs1994
3b0e7e6eef REMOVE alauda mirror and Docker Toolbox 2017-09-05 21:40:41 +08:00
khs1994
826e7efe64 UPDATE install 2017-09-04 23:34:38 +08:00
khs1994
1295b4a7ec ADD link Chinese Copywriting Guidelines 2017-09-04 22:12:15 +08:00
khs1994
a183b98904 change “” ‘’ to 「」『』 2017-09-04 22:06:11 +08:00
khs1994
33ae9109cc rm parenthese in line2 2017-09-04 21:21:52 +08:00
khs1994
3af33b04c6 link install/mirror.md 2017-09-04 20:05:15 +08:00
Baohua Yang
cd7873ba60 Merge pull request #198 from yeasy/revert-195-master
Revert "fix #186"
2017-09-04 19:31:33 +08:00
Baohua Yang
66dd70e5db Revert "fix #186" 2017-09-04 19:31:17 +08:00
khs1994
9dc98b20bd fix #186 2017-09-04 15:19:13 +08:00
Baohua Yang
2070dc8bce Merge pull request #195 from khs1994-gitbook/master
Fix #186 and #195
2017-09-04 14:57:52 +08:00
Baohua Yang
0f883b44a4 Merge pull request #194 from khs1994/master
UPDATE install with adding more os types
2017-09-04 14:54:19 +08:00
khs1994
83619f6820 add travis 2017-09-04 13:31:21 +08:00
khs1994
80b6d320b5 add travis 2017-09-04 13:29:26 +08:00
khs1994
9088a8e593 add travis 2017-09-04 13:25:27 +08:00
khs1994
b1981c23b0 add travis 2017-09-04 13:18:58 +08:00
khs1994
a284c991ba add travis 2017-09-04 12:56:06 +08:00
khs1994
cd1a1f3651 add travis 2017-09-04 12:47:22 +08:00
khs1994
87e4426503 fix #186 2017-09-04 11:39:33 +08:00
khs1994
6d835a3223 ADD Docker CE & Docker EE 2017-09-04 11:19:16 +08:00
khs1994
58825092fb ADD Docker CE for Windows 10 PC 2017-09-04 11:18:56 +08:00
khs1994
22bedf108e UP Docker CE for Debian 2017-09-04 11:18:25 +08:00
khs1994
ff520b5913 UP Docker CE for Ubuntu 2017-09-04 11:18:14 +08:00
khs1994
1591496dbf UP Docker CE for macOS 2017-09-04 11:17:56 +08:00
khs1994
94ef476be0 UP Docker CE for CentOS 7 2017-09-04 11:17:39 +08:00
khs1994
c5522602c9 ADD install debian.md windows.md 2017-09-04 11:16:15 +08:00
khs1994
75cb449ed2 ADD Docker for Windows imgs 2017-09-04 11:15:44 +08:00
Baohua Yang
d8b2a7a303 Remove failed qq group number 2017-09-01 11:28:04 +08:00
Baohua Yang
41779a5661 Merge pull request #188 from pkking/master
Add new registry mirror from official site
2017-08-21 16:58:07 +08:00
pkking
fc86abea99 1. 增加docker 官方registry mirror的地址
2. 增加新版本检查registry生效的方法

Signed-off-by: pkking <pkwarcraft@gmail.com>
2017-08-21 15:29:02 +08:00
Baohua Yang
62f9976b0d Merge pull request #187 from silenceper/master
Fix consul name
2017-08-16 13:49:04 +08:00
silenceper
70d77b489d fix:单词错误 2017-08-15 15:12:36 +08:00
silenceper
060dee21d5 fix:consel=>consul 2017-08-15 15:11:10 +08:00
Baohua Yang
f59dd5bdc0 Merge pull request #184 from liu4480/master
Update docker-registry repo
2017-07-28 14:13:21 +08:00
Bin Liu
6612b45387 docker-registry is DEPRECATED 2017-07-28 14:06:48 +08:00
Baohua Yang
f7e6d648f5 Merge pull request #183 from wzcboss/master
Remove ";" in python code
2017-07-25 10:38:38 +08:00
wzcboss
1a5c72ee10 remove ;in index.py 2017-07-24 17:18:05 +08:00
Baohua Yang
de972a0404 Merge pull request #179 from alex8866/master
Update tencent cloud introduction
2017-07-18 20:53:59 +08:00
Lingfei Kong
5217746e64 change term 你 to 用户 2017-07-18 14:50:06 +08:00
Baohua Yang
91e53f489a 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
f1a9e3372c Merge pull request #182 from leotian/fix-img
Fix missing image
2017-07-17 23:10:48 +08:00
leotian
647828bf85 refactor: image not found 2017-07-17 11:12:42 +08:00
Lingfei Kong
9e2cdc0779 腾讯云已经推出了容器服务,更新容器与云计算章节中的腾讯云部分介绍 2017-07-03 10:40:25 +08:00
Baohua Yang
62c03c1c53 Merge pull request #177 from wenfengshi/master
Fix typo and broken links
2017-06-18 14:59:13 +08:00
onephone
b0d1050cfb Fix issue #176: remove the dead links 2017-06-18 14:35:52 +08:00
onephone
0fd286a5d1 完善命令,补充新版本命令说明 2017-06-18 11:35:34 +08:00
onephone
f07c51e2e7 Fix issue: change github.org to github.com 2017-06-18 09:01:46 +08:00
Baohua Yang
705fb2efc3 Merge pull request #175 from shuizhongyueming/f/RUN命令调整
Fix run cmd
2017-06-01 18:50:13 +08:00
shuizhongyueming
f23e8f8ce7 修复在ONBUILD章节里面RUN命令的使用错误
在ONBUILD章节里面RUN后面要执行的命令被双引号括起来了
在基于demo提供的Dockerfile来构建镜像时,Docker会报类似"/bin/sh: 1: mkdir /app: not found"的错误
去掉之后就一切正常了
2017-06-01 18:11:18 +08:00
Baohua Yang
5f481b90dc Update figure path 2017-05-24 11:44:57 +08:00
Baohua Yang
a7ac3b4273 Update v2 registry path 2017-05-24 11:40:47 +08:00
Baohua Yang
e33150db73 Update figure location 2017-05-24 11:37:58 +08:00
Baohua Yang
095244b371 Add os cases 2017-05-24 11:22:23 +08:00
Baohua Yang
4f7a1ef89c Remove unused content 2017-05-24 11:17:11 +08:00
Baohua Yang
6e3c7fd2a5 Fix issue#174 2017-05-24 11:13:57 +08:00
Baohua Yang
5786333a3b Update swarm and mesos chapter 2017-05-02 23:17:58 +08:00
Baohua Yang
2568854736 Merge pull request #171 from glixingxian/master
Improve nsenter example
2017-05-02 11:31:51 +08:00
Xingxian LI
79f0fc403f improve nsenter example 2017-05-01 16:35:43 +02:00
Baohua Yang
4ca37a0de7 Merge pull request #170 from shuizhongyueming/master
Update using mirror at MacOS
2017-04-29 22:46:46 +08:00
happy wang
34b0969ef7 更新mirror.md
新增macOS下配置加速器的方法
2017-04-27 18:53:06 +08:00
Baohua Yang
1bfd80b970 Merge pull request #167 from aleen42/patch-1
Add a plugin `page-treeview`
2017-04-24 16:49:30 +08:00
Aleen
8f7b408091 Adding a plugin named page-treeview 2017-04-24 15:59:27 +08:00
Baohua Yang
e87ff1bb1e 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
7ef6616b1c Fixed url and add footnote to new Docker Store 2017-04-22 00:27:44 +08:00
Baohua Yang
fcabe5bc3b Add new book link 2017-03-21 09:22:20 +08:00
Baohua Yang
60ebacfda4 Merge pull request #163 from shijinzhan/patch-1
Add space before title
2017-03-15 11:36:04 +08:00
shijinzhan
df6d092c11 标题细节调整 2017-03-15 09:48:29 +08:00
Baohua Yang
2a39cf4ce8 Merge pull request #162 from stenote/patch-1
Update WORKDIR usage
2017-03-14 20:47:39 +08:00
Rui Ma
22fa7ea709 Update workdir.md
workdir 可以自动帮忙建立目录
2017-03-14 17:06:48 +08:00
Baohua Yang
17add1cda4 Merge pull request #161 from Howld/master
Fix typos
2017-03-03 11:29:39 +08:00
Howld
a56376fc7c #160 2017-03-02 19:58:32 +08:00
Baohua Yang
9c93015ed3 Merge branch 'master' of github.com:yeasy/docker_practice 2017-02-22 10:17:08 +08:00
Baohua Yang
c703cae1cf Update china-pub link 2017-02-22 10:17:02 +08:00
Baohua Yang
86523b981e Merge pull request #158 from 374632897/master
Fix typos
2017-02-19 16:08:12 +08:00
Jason
4f3ecaa0df 在 -> 再 2017-02-18 22:07:35 +08:00
Jason
f22277afbf 是用 -> 使用 2017-02-18 21:02:39 +08:00
Jason
d9648a2544 至于修改为置于 2017-02-18 14:35:44 +08:00
Baohua Yang
12ddbfda1e 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
0d2cc4a8d3 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
e003739d1a Merge pull request #155 from gerryke/master
Fix typo
2017-02-10 21:32:17 +08:00
gerryke
59e80243dc 修改Entrypoint介绍章节中错别字“远了”为“原来” 2017-02-09 17:12:26 +08:00
Baohua Yang
8a8edc3767 Merge branch 'master' of github.com:yeasy/docker_practice 2017-02-09 09:36:10 +08:00
Baohua Yang
94e6ed39cc Add version 2 release news 2017-02-09 09:36:05 +08:00
Baohua Yang
3344b31dcc Merge pull request #154 from mzeht/master
Fix format
2017-02-07 22:15:49 +08:00
mzeht
caf3cdf801 appendix/repo目录下语法格式修改 2017-02-07 22:04:05 +08:00
mzeht
53aca57515 appendix/repo/ubuntu.md语法格式修改 2017-02-07 21:59:32 +08:00
Baohua Yang
7726d62b7a Merge pull request #150 from qiuyin/master
Update volume.md
2017-01-26 15:32:06 +08:00
qiuyin
b003629be5 Update volume.md 2017-01-26 11:10:42 +09:00
Baohua Yang
8291e13c27 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
05120d9e5e 对查看数据卷的具体信息,补充了最新版的内容。 2017-01-21 20:18:39 +09:00
qiuyin
d4c1f98702 Update volume.md 2017-01-20 18:10:20 +09:00
Baohua Yang
a3bec5ffba Merge pull request #148 from hkKimWu/master
Fix missing comma
2017-01-13 17:07:31 +08:00
Kim Wu
78e5d45125 改正输入错漏。
CMD ["nginx" "-g" "daemon off;"] -> CMD ["nginx", "-g", "daemon off;"]
2017-01-13 14:21:35 +08:00
yeasy
37b4149605 Add cloud chapter 2017-01-12 16:11:33 +08:00
Baohua Yang
ec70b04ff0 Add cloud chapter 2017-01-12 15:41:14 +08:00
Baohua Yang
c247ef2aef Add revision and contribute section 2017-01-12 13:25:22 +08:00
Baohua Yang
60388ba6e9 Merge pull request #147 from QwertyJack/master
Fix typo
2017-01-11 17:44:36 +08:00
Baohua Yang
bcb673ad00 Add figure 2017-01-11 17:17:49 +08:00
jack@yfy
9e60e762f5 a little spelling mistake 2017-01-10 22:30:02 +08:00
Baohua Yang
db5da49511 release 0.8.0 2017-01-08 22:48:29 +08:00
Baohua Yang
dd33dea8e4 Merge pull request #146 from JohannLai/master
Fix “Web” to "web",consistent with sub directories
2017-01-06 22:43:35 +08:00
johannlai
0b99f62220 修改Web为web,与目录中的命名一致 2017-01-06 15:44:31 +08:00
Baohua Yang
8daf9c4f15 Fix figure path 2016-12-20 15:47:31 +08:00
Baohua Yang
57b6e46ad2 Update version number 2016-12-20 15:46:42 +08:00
yeasy
0f91a0ed7d 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
b2508c8bac Updates Compose usage 2016-12-20 15:35:52 +08:00
Baohua Yang
2226d748e3 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
52934e24c9 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
353 changed files with 10617 additions and 4932 deletions

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

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 版本低于 19.03 请尽可能升级到该版本保留你的 Docker 版本其他选项删除-->
<!--if Docker version under 19.03, please upgrade Docker to 19.03-->
* [x] Edge (v19.03)
* [x] Stable (v19.03)
* [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 版本低于 19.03 请尽可能升级到该版本保留你的 Docker 版本其他选项删除-->
<!--if Docker version under 19.03, please upgrade Docker to 19.03-->
* [x] Edge (v19.03)
* [x] Stable (v19.03)
* [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
-->

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

@@ -0,0 +1,18 @@
on:
push:
pull_request:
name: CI
jobs:
build:
name: Build GitBook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 2
- name: Build
uses: docker://yeasy/docker_practice
with:
args: build

1
.gitignore vendored
View File

@@ -6,3 +6,4 @@ _book/
*.swp
*.edx
.DS_Store
node_modules/

53
.travis.yml Normal file
View File

@@ -0,0 +1,53 @@
language: bash
services:
- docker
before_install:
- openssl aes-256-cbc -K $encrypted_6cc8cff04075_key -iv $encrypted_6cc8cff04075_iv
-in .travis/id_rsa.enc -out ~/.ssh/id_rsa -d
- chmod 600 ~/.ssh/id_rsa
- export TZ='Asia/Shanghai'
- date
- git config --global user.name "khs1994"
- git config --global user.email "khs1994@khs1994.com"
script:
- docker run -it --rm -v $PWD:/srv/gitbook-src yeasy/docker_practice build
after_success:
- sudo chmod -R 777 _book
- echo "FROM nginx:alpine" >> Dockerfile
- echo "COPY _book /usr/share/nginx/html" >> Dockerfile
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t dockerpracticesig/docker_practice:us-en .
- docker run -dit --rm -p 4000:80 dockerpracticesig/docker_practice:us-en
- sleep 5
- curl 127.0.0.1:4000
- docker push dockerpracticesig/docker_practice:us-en
- cd _book
- git init
- git remote add origin "$DEPLOY_REPO"
- git add .
- COMMIT=`date "+%F %T"`
- git commit -m "Travis CI Site updated $COMMIT"
- git push -f origin master:"$DEPLOY_BRANCH"
env:
global:
- DEPLOY_BRANCH: master
- DEPLOY_REPO: git@github.com:docker-practice/us-en.git
addons:
ssh_known_hosts:
- github.com
branches:
only:
- english

26
.travis/Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
FROM node:alpine
ENV TZ=Asia/Shanghai
WORKDIR /srv/gitbook
COPY book.json book.json
COPY docker-entrypoint.sh /usr/local/bin/
RUN apk add --no-cache \
tzdata \
&& npm install -g gitbook-cli \
&& gitbook install \
&& ln -s /usr/local/bin/docker-entrypoint.sh / \
&& rm -rf /root/.npm /tmp/*
EXPOSE 4000
VOLUME /srv/gitbook-src
WORKDIR /srv/gitbook-src
ENTRYPOINT ["docker-entrypoint.sh"]
CMD server

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

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

@@ -0,0 +1,21 @@
#!/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; fi
exec gitbook serve
exit 0
}
main $1 $2 $3

BIN
.travis/id_rsa.enc Normal file

Binary file not shown.

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

120
CHANGELOG.md Normal file
View File

@@ -0,0 +1,120 @@
## 主要修订记录
* 1.1.0 2019-12-31
* 全面支持 v19.x 新版本
* 增加 `BuildKit`
* 增加 `docker manifest` 命令使用说明
* 移除 `Ubuntu 14.04` `Debian 8` `Debian 7`
* 1.0.0: 2018-12-31
* 全面支持 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) 规范。

132
README.md
View File

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

View File

@@ -1,129 +1,155 @@
# Summary
* [前言](README.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)
* [安装](install/README.md)
* [Ubuntu](install/ubuntu.md)
* [CentOS](install/centos.md)
* [Debian](install/debian.md)
* [镜像](image/README.md)
* [获取镜像](image/pull.md)
* [列出](image/list.md)
* [创建](image/create.md)
* [存出和载入](image/save_load.md)
* [移除](image/rmi.md)
* [实现原理](image/internal.md)
* [容器](container/README.md)
* [启动](container/run.md)
* [守护态运行](container/daemon.md)
* [终止](container/stop.md)
* [进入容器](container/enter.md)
* [导出和导入](container/import_export.md)
* [删除](container/rm.md)
* [仓库](repository/README.md)
* [Docker Hub](repository/dockerhub.md)
* [私有仓库](repository/local_repo.md)
* [配置文件](repository/config.md)
* [数据管理](data_management/README.md)
* [数据卷](data_management/volume.md)
* [数据卷容器](data_management/container.md)
* [备份恢复迁移数据卷](data_management/management.md)
* [使用网络](network/README.md)
* [外部访问容器](network/port_mapping.md)
* [容器互联](network/linking.md)
* [高级网络配置](advanced_network/README.md)
* [快速配置指南](advanced_network/quick_guide.md)
* [配置 DNS](advanced_network/dns.md)
* [容器访问控制](advanced_network/access_control.md)
* [端口映射实现](advanced_network/port_mapping.md)
* [配置 docker0 网桥](advanced_network/docker0.md)
* [自定义网桥](advanced_network/bridge.md)
* [工具和示例](advanced_network/example.md)
* [编辑网络配置文件](advanced_network/config_file.md)
* [实例创建一个点到点连接](advanced_network/ptp.md)
* [实战案例](cases/README.md)
* [使用 Supervisor 来管理进程](cases/supervisor.md)
* [创建 tomcat/weblogic 集群](cases/tomcat.md)
* [多台物理主机之间的容器互联](cases/container_connect.md)
* [标准化开发测试和生产环境](cases/environment.md)
* [安全](security/README.md)
* [内核名字空间](security/kernel_ns.md)
* [控制组](security/control_group.md)
* [服务端防护](security/daemon_sec.md)
* [内核能力机制](security/kernel_capability.md)
* [其它安全特性](security/other_feature.md)
* [总结](security/summary.md)
* [Dockerfile](dockerfile/README.md)
* [基本结构](dockerfile/basic_structure.md)
* [指令](dockerfile/instructions.md)
* [创建镜像](dockerfile/build_image.md)
* [底层实现](underly/README.md)
* [基本架构](underly/arch.md)
* [名字空间](underly/namespace.md)
* [控制组](underly/cgroups.md)
* [联合文件系统](underly/ufs.md)
* [容器格式](underly/container_format.md)
* [网络](underly/network.md)
* [Docker Compose 项目](compose/README.md)
* [简介](compose/intro.md)
* [安装](compose/install.md)
* [使用](compose/usage.md)
* [命令说明](compose/commands.md)
* [YAML 模板文件](compose/yaml_file.md)
* [Docker Machine 项目](machine/README.md)
* [简介](machine/intro.md)
* [安装](machine/install.md)
* [使用](machine/usage.md)
* [Docker Swarm 项目](swarm/README.md)
* [简介](swarm/intro.md)
* [安装](swarm/install.md)
* [使用](swarm/usage.md)
* [调度器](swarm/scheduling.md)
* [过滤器](swarm/filter.md)
* [Etcd 项目](etcd/README.md)
* [简介](etcd/intro.md)
* [安装](etcd/install.md)
* [使用 etcdctl](etcd/etcdctl.md)
* [Fig 项目](fig/README.md)
* [简介](fig/intro.md)
* [安装](fig/install.md)
* [命令参考](fig/cli_ref.md)
* [fig.yml参考](fig/yml_ref.md)
* [环境变量参考](fig/env_ref.md)
* [实战 Django](fig/django.md)
* [实战 Rails](fig/rails.md)
* [实战 wordpress](fig/wordpress.md)
* [CoreOS 项目](coreos/README.md)
* [简介](coreos/intro.md)
* [工具](coreos/intro_tools.md)
* [快速搭建CoreOS集群](coreos/quickstart.md)
* [Kubernetes 项目](kubernetes/README.md)
* [简介](kubernetes/intro.md)
* [快速上手](kubernetes/quickstart.md)
* [基本概念](kubernetes/concepts.md)
* [kubectl 使用](kubernetes/kubectl.md)
* [架构设计](kubernetes/design.md)
* [Mesos 项目](mesos/README.md)
* [简介](mesos/intro.md)
* [安装与使用](mesos/installation.md)
* [原理与架构](mesos/architecture.md)
* [配置项解析](mesos/configuration.md)
* [常见框架](mesos/framework.md)
* [附录一命令查询](appendix_command/README.md)
* [附录二常见仓库介绍](appendix_repo/README.md)
* [Ubuntu](appendix_repo/ubuntu.md)
* [CentOS](appendix_repo/centos.md)
* [MySQL](appendix_repo/mysql.md)
* [MongoDB](appendix_repo/mongodb.md)
* [Redis](appendix_repo/redis.md)
* [Nginx](appendix_repo/nginx.md)
* [WordPress](appendix_repo/wordpress.md)
* [Node.js](appendix_repo/nodejs.md)
* [附录三有用的资源](appendix_resources/README.md)
# [Docker 从入门到实践英文版](https://github.com/yeasy/docker_practice/blob/english/SUMMARY.md)
* [README](README.md)
* [CHANGELOG](CHANGELOG.md)
* [CONTRIBUTING](CONTRIBUTING.md)
* [Introduction](introduction/README.md)
* [What is Docker](introduction/what.md)
* [Why Docker](introduction/why.md)
* [Basic concept](basic_concept/README.md)
* [Image](basic_concept/image.md)
* [Container](basic_concept/container.md)
* [Repository](basic_concept/repository.md)
* [Get 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)
* [macOS](install/mac.md)
* [Windows PC](install/windows.md)
* [Mirror](install/mirror.md)
* [Image](image/README.md)
* [pull](image/pull.md)
* [list](image/list.md)
* [Delete](image/rm.md)
* [commit](image/commit.md)
* [Dockerfile](image/build.md)
* [Dockerfile reference](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)
* [References](image/dockerfile/references.md)
* [Multistage builds](image/multistage-builds/README.md)
* [Multistage builds Laravel](image/multistage-builds/laravel.md)
* [manifest](image/manifest.md)
* [BuildKit](image/buildkit.md)
* [Other](image/other.md)
* [Internal](image/internal.md)
* [Container](container/README.md)
* [run](container/run.md)
* [Daemon](container/daemon.md)
* [stop](container/stop.md)
* [exec](container/attach_exec.md)
* [Import and export](container/import_export.md)
* [Delete](container/rm.md)
* [Repository](repository/README.md)
* [Docker Hub](repository/dockerhub.md)
* [Docker Registry](repository/registry.md)
* [Docker Registry TLS](repository/registry_auth.md)
* [Nexus 3](repository/nexus3_registry.md)
* [Data management](data_management/README.md)
* [Volumes](data_management/volume.md)
* [Bind mounts](data_management/bind-mounts.md)
* [Network](network/README.md)
* [Port mapping](network/port_mapping.md)
* [Linking](network/linking.md)
* [DNS](network/dns.md)
* [Advanced network](advanced_network/README.md)
* [Guide](advanced_network/quick_guide.md)
* [Access control](advanced_network/access_control.md)
* [Port mapping](advanced_network/port_mapping.md)
* [docker0](advanced_network/docker0.md)
* [Bridge](advanced_network/bridge.md)
* [Example](advanced_network/example.md)
* [Config](advanced_network/config_file.md)
* [PTP](advanced_network/ptp.md)
* [Docker Compose](compose/README.md)
* [Introduction](compose/introduction.md)
* [Install](compose/install.md)
* [Usage](compose/usage.md)
* [Commands](compose/commands.md)
* [Compose file reference](compose/compose_file.md)
* [Django](compose/django.md)
* [Rails](compose/rails.md)
* [WordPress](compose/wordpress.md)
* [Docker Swarm](swarm/README.md)
* [Swarm mode](swarm_mode/README.md)
* [Overview](swarm_mode/overview.md)
* [Create](swarm_mode/create.md)
* [Deploy](swarm_mode/deploy.md)
* [Stack](swarm_mode/stack.md)
* [Secret](swarm_mode/secret.md)
* [Config](swarm_mode/config.md)
* [Rolling update](swarm_mode/rolling_update.md)
* [Security](security/README.md)
* [namespace](security/kernel_ns.md)
* [cgroups](security/control_group.md)
* [Daemon sec](security/daemon_sec.md)
* [Kernel capability](security/kernel_capability.md)
* [Other feature](security/other_feature.md)
* [SUMMARY](security/summary.md)
* [Underly](underly/README.md)
* [Arch](underly/arch.md)
* [namespace](underly/namespace.md)
* [cgroups](underly/cgroups.md)
* [ufs](underly/ufs.md)
* [Container format](underly/container_format.md)
* [Network](underly/network.md)
* [Etcd](etcd/README.md)
* [Introduction](etcd/intro.md)
* [Install](etcd/install.md)
* [Cluster](etcd/cluster.md)
* [etcdctl](etcd/etcdctl.md)
* [CoreOS](coreos/README.md)
* [Introduction](coreos/intro.md)
* [Tools](coreos/intro_tools.md)
* [Kubernetes](kubernetes/README.md)
* [Introduction](kubernetes/intro.md)
* [Quick start](kubernetes/quickstart.md)
* [Concepts](kubernetes/concepts.md)
* [kubectl](kubernetes/kubectl.md)
* [Design](kubernetes/design.md)
* [Cloud](cloud/README.md)
* [Introduction](cloud/intro.md)
* [AWS](cloud/aws.md)
* [Tencent Cloud](cloud/tencentCloud.md)
* [Alibaba Cloud](cloud/alicloud.md)
* [SUMMARY](cloud/summary.md)
* [OS](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)
* [SUMMARY](cases/os/summary.md)
* [CI/CD](cases/ci/README.md)
* [GitHub Actions](cases/ci/actions/README.md)
* [Drone](cases/ci/drone/README.md)
* [Install Drone](cases/ci/drone/install.md)
* [Travis CI](cases/ci/travis/README.md)
* [Docker Open Source](opensource/README.md)
* [LinuxKit](opensource/linuxkit.md)
* [Appendix](appendix/README.md)
* [FAQ](appendix/faq/README.md)
* [Sample Docker Image](appendix/repo/README.md)
* [Ubuntu](appendix/repo/ubuntu.md)
* [CentOS](appendix/repo/centos.md)
* [Nginx](appendix/repo/nginx.md)
* [PHP](appendix/repo/php.md)
* [MySQL](appendix/repo/mysql.md)
* [WordPress](appendix/repo/wordpress.md)
* [MongoDB](appendix/repo/mongodb.md)
* [Redis](appendix/repo/redis.md)
* [Node.js](appendix/repo/nodejs.md)
* [Docker commands](appendix/command/README.md)
* [Docker debug](appendix/debug.md)
* [Resources](appendix/resources.md)

2
_config.yml Normal file
View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

BIN
_images/cover.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

BIN
_images/cover.sketch Normal file

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

BIN
_images/docker_primer2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

BIN
_images/docker_primer3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
_images/donate.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

View File

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

Binary file not shown.

View File

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

View File

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

View File

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

View File

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

View File

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

@@ -4,12 +4,12 @@
### 容器访问外部网络
容器要想访问外部网络需要本地系统的转发支持在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
@@ -20,9 +20,9 @@ $sysctl -w net.ipv4.ip_forward=1
* 本地系统的防火墙软件 -- `iptables` 是否允许通过
#### 访问所有端口
当启动 Docker 服务时候默认会添加一条转发策略到 iptables FORWARD 链上策略为通过`ACCEPT`还是禁止`DROP`取决于配置`--icc=true`缺省值还是 `--icc=false`当然如果手动指定 `--iptables=false` 则不会添加 `iptables` 规则
当启动 Docker 服务 dockerd时候默认会添加一条转发策略到本地主机 iptables FORWARD 链上策略为通过`ACCEPT`还是禁止`DROP`取决于配置`--icc=true`缺省值还是 `--icc=false`当然如果手动指定 `--iptables=false` 则不会添加 `iptables` 规则
可见默认情况下不同容器之间是允许网络互通的如果为了安全考虑可以在 `/etc/default/docker` 文件中配置 `DOCKER_OPTS=--icc=false` 来禁止它
可见默认情况下不同容器之间是允许网络互通的如果为了安全考虑可以在 `/etc/docker/daemon.json` 文件中配置 `{"icc": false}` 来禁止它
#### 访问指定端口
在通过 `-icc=false` 关闭网络访问后还可以通过 `--link=CONTAINER_NAME:ALIAS` 选项来访问容器的开放端口
@@ -30,7 +30,7 @@ $sysctl -w net.ipv4.ip_forward=1
例如在启动 Docker 服务时可以同时使用 `icc=false --iptables=true` 参数来关闭允许相互的网络访问并让 Docker 可以修改系统中的 `iptables` 规则
此时系统中的 `iptables` 规则可能是类似
```
```bash
$ sudo iptables -nL
...
Chain FORWARD (policy ACCEPT)
@@ -39,10 +39,10 @@ DROP all -- 0.0.0.0/0 0.0.0.0/0
...
```
之后启动容器`docker run`时使用 `--link=CONTAINER_NAME:ALIAS` 选项Docker 会在 `iptable` 中为 两个容器分别添加一条 `ACCEPT` 规则允许相互访问开放的端口取决于 Dockerfile 中的 EXPOSE
之后启动容器`docker run`时使用 `--link=CONTAINER_NAME:ALIAS` 选项Docker 会在 `iptable` 中为 两个容器分别添加一条 `ACCEPT` 规则允许相互访问开放的端口取决于 `Dockerfile` 中的 `EXPOSE` 指令
当添加了 `--link=CONTAINER_NAME:ALIAS` 选项后添加了 `iptables` 规则
```
```bash
$ sudo iptables -nL
...
Chain FORWARD (policy ACCEPT)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -6,18 +6,18 @@
解决办法很简单创建一对 `peer` 接口分别放到两个容器中配置成点到点链路类型即可
首先启动 2 个容器
```
$ sudo docker run -i -t --rm --net=none base /bin/bash
```bash
$ docker run -i -t --rm --net=none base /bin/bash
root@1f1f4c1f931a:/#
$ sudo docker run -i -t --rm --net=none base /bin/bash
$ docker run -i -t --rm --net=none base /bin/bash
root@12e343489d2f:/#
```
找到进程号然后创建网络名空间的跟踪文件
```
$ sudo docker inspect -f '{{.State.Pid}}' 1f1f4c1f931a
找到进程号然后创建网络名空间的跟踪文件
```bash
$ docker inspect -f '{{.State.Pid}}' 1f1f4c1f931a
2989
$ sudo docker inspect -f '{{.State.Pid}}' 12e343489d2f
$ docker inspect -f '{{.State.Pid}}' 12e343489d2f
3004
$ sudo mkdir -p /var/run/netns
$ sudo ln -s /proc/2989/ns/net /var/run/netns/2989
@@ -25,7 +25,7 @@ $ sudo ln -s /proc/3004/ns/net /var/run/netns/3004
```
创建一对 `peer` 接口然后配置路由
```
```bash
$ sudo ip link add A type veth peer name B
$ sudo ip link set A netns 2989

View File

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

1
appendix/README.md Normal file
View File

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

View File

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

View File

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

View File

@@ -0,0 +1 @@
# [Best practices for writing Dockerfiles](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/)

129
appendix/command/README.md Normal file
View File

@@ -0,0 +1,129 @@
# Docker 命令查询
## 基本语法
Docker 命令有两大类客户端命令和服务端命令前者是主要的操作接口后者用来启动 Docker Daemon
* 客户端命令基本命令格式为 `docker [OPTIONS] COMMAND [arg...]`
* 服务端命令基本命令格式为 `dockerd [OPTIONS]`
可以通过 `man docker` `docker help` 来查看这些命令
## 客户端命令选项
* `--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 校验默认为否
## 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 映射到容器内进程
## 客户端命令
可以通过 `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)

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 dmesag |grep dockerd
$ sudo dmesag |grep runc
```
## Docker 不响应时处理
可以杀死 dockerd 进程查看其堆栈调用情况
```bash
$ sudo kill -SIGUSR1 $(pidof dockerd)
```
## 重置 Docker 本地数据
*注意本操作会移除所有的 Docker 本地数据包括镜像和容器等*
```bash
$ sudo rm -rf /var/lib/docker
```

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

@@ -0,0 +1,214 @@
# 常见问题总结
## 镜像相关
### 如何批量清理临时镜像文件
可以使用 `docker image prune` 命令
### 如何查看镜像支持的环境变量
可以使用 `docker run IMAGE env` 命令
### 本地的镜像文件都存放在哪里
Docker 相关的本地资源默认存放在 `/var/lib/docker/` 目录下 `aufs` 文件系统为例其中 `container` 目录存放容器信息`graph` 目录存放镜像信息`aufs` 目录下存放具体的镜像层文件
### 构建 Docker 镜像应该遵循哪些原则
整体原则上尽量保持镜像功能的明确和内容的精简要点包括
* 尽量选取满足需求但较小的基础系统镜像例如大部分时候可以选择 debian:wheezy debian:stretch 镜像仅有不足百兆大小
* 清理编译生成文件安装包的缓存等临时文件
* 安装各个软件时候要指定准确的版本号并避免引入不需要的依赖
* 从安全角度考虑应用要尽量使用系统的库和依赖
* 如果安装应用时候需要配置一些特殊的环境变量在安装后要还原不需要保持的变量值
* 使用 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 信息
可以使用 `docker inspect --format '{{ .State.Pid }}' <CONTAINER ID or NAME>` 命令
### 如何获取某个容器的 IP 地址
可以使用 `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 则在如下的几个方面进行了改进
* 移植性通过抽象容器配置容器可以实现从一个平台移植到另一个平台
* 镜像系统基于 AUFS 的镜像系统为容器的分发带来了很多的便利同时共同的镜像层只需要存储一份实现高效率的存储
* 版本管理类似于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 ~ 7 各个版本的镜像
### 使用方法
默认会启动一个最小化的 CentOS 环境
```bash
$ docker run --name centos -it centos bash
bash-4.2#
```
### Dockerfile
请到 https://github.com/docker-library/docs/tree/master/centos 查看。

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 查看

View File

@@ -1,34 +1,48 @@
## [Nginx](https://registry.hub.docker.com/_/nginx/)
## [Nginx](https://hub.docker.com/_/nginx/)
### 基本信息
[Nginx](https://en.wikipedia.org/wiki/Nginx) 是开源的高效的 Web 服务器实现,支持 HTTP、HTTPS、SMTP、POP3、IMAP 等协议。
该仓库提供了 Nginx 1.0 ~ 1.7 各个版本的镜像
该仓库位于 `https://hub.docker.com/_/nginx/` 提供了 Nginx 1.0 ~ 1.17.x 各个版本的镜像
### 使用方法
下面的命令将作为一个静态页面服务器启动
```bash
$ docker run --name some-nginx -v /some/content:/usr/share/nginx/html:ro -d nginx
```
$ sudo docker run --name some-nginx -v /some/content:/usr/share/nginx/html:ro -d nginx
```
用户也可以不使用这种映射方式通过利用 Dockerfile 来直接将静态页面内容放到镜像中内容为
```
```bash
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
```
$ sudo docker build -t some-content-nginx .
$ sudo docker run --name some-nginx -d some-content-nginx
```
开放端口并映射到本地的 `8080` 端口
```
sudo docker run --name some-nginx -d -p 8080:80 some-content-nginx
```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 \
-v /some/nginx.conf:/etc/nginx/nginx.conf:ro \
nginx
```
docker run --name some-nginx -v /some/nginx.conf:/etc/nginx/nginx.conf:ro -d nginx
```
使用配置文件时为了在容器中正常运行需要保持 `daemon off;`
### Dockerfile
* [1 ~ 1.7 版本](https://github.com/nginxinc/docker-nginx/blob/3713a0157083eb4776e71f5a5aef4b2a5bc03ab1/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 ~ 12.x 各个版本的镜像
### 使用方法
在项目中创建一个 Dockerfile
```bash
FROM node:9
# 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:9-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 ~ 7.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 ~ 5.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 ~ 19.04 各个版本的镜像
### 使用方法
默认会启动一个最小化的 Ubuntu 环境
```bash
$ docker run --name some-ubuntu -it ubuntu:18.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 查看。

27
appendix/resources.md Normal file
View File

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

View File

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

View File

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

View File

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

View File

@@ -1,26 +0,0 @@
## [MongoDB](https://registry.hub.docker.com/_/mongo/)
### 基本信息
[MongoDB](https://en.wikipedia.org/wiki/MongoDB) 是开源的 NoSQL 数据库实现。
该仓库提供了 MongoDB 2.2 ~ 2.7 各个版本的镜像
### 使用方法
默认会在 `27017` 端口启动数据库
```
$ sudo docker run --name some-mongo -d mongo
```
使用其他应用连接到容器可以用
```
$ sudo docker run --name some-app --link some-mongo:mongo -d application-that-uses-mongo
```
或者通过 `mongo`
```
$ sudo docker run -it --link some-mongo:mongo --rm mongo sh -c 'exec mongo "$MONGO_PORT_27017_TCP_ADDR:$MONGO_PORT_27017_TCP_PORT/test"'
```
### Dockerfile
* [2.2 版本](https://github.com/docker-library/mongo/blob/77c841472ccb6cc87fea1218269d097405edc6cb/2.2/Dockerfile)
* [2.4 版本](https://github.com/docker-library/mongo/blob/807078cb7b5f0289f6dabf9f6875d5318122bc30/2.4/Dockerfile)
* [2.6 版本](https://github.com/docker-library/mongo/blob/77c841472ccb6cc87fea1218269d097405edc6cb/2.6/Dockerfile)
* [2.7 版本](https://github.com/docker-library/mongo/blob/807078cb7b5f0289f6dabf9f6875d5318122bc30/2.7/Dockerfile)

View File

@@ -1,23 +0,0 @@
## [MySQL](https://registry.hub.docker.com/_/mysql/)
### 基本信息
[MySQL](https://en.wikipedia.org/wiki/MySQL) 是开源的关系数据库实现。
该仓库提供了 MySQL 各个版本的镜像包括 5.6 系列5.7 系列等
### 使用方法
默认会在 `3306` 端口启动数据库
```
$ sudo docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=mysecretpassword -d mysql
```
之后就可以使用其它应用来连接到该容器
```
$ sudo docker run --name some-app --link some-mysql:mysql -d application-that-uses-mysql
```
或者通过 `mysql`
```
$ sudo docker run -it --link some-mysql:mysql --rm 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
* [5.6 版本](https://github.com/docker-library/mysql/blob/7461a52b43f06839a4d8723ae8841f4cb616b3d0/5.6/Dockerfile)
* [5.7 版本](https://github.com/docker-library/mysql/blob/7461a52b43f06839a4d8723ae8841f4cb616b3d0/5.7/Dockerfile)

View File

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

View File

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

View File

@@ -1,17 +0,0 @@
## [Ubuntu](https://registry.hub.docker.com/_/ubuntu/)
### 基本信息
[Ubuntu](https://en.wikipedia.org/wiki/Ubuntu) 是流行的 Linux 发行版,其自带软件版本往往较新一些。
该仓库提供了 Ubuntu从12.04 ~ 14.10 各个版本的镜像
### 使用方法
默认会启动一个最小化的 Ubuntu 环境
```
$ sudo docker run --name some-ubuntu -i -t ubuntu
root@523c70904d54:/#
```
### Dockerfile
* [12.04 版本](https://github.com/tianon/docker-brew-ubuntu-core/blob/2b105575647a7e2030ff344d427c3920b89e17a9/precise/Dockerfile)
* [14.04 版本](https://github.com/tianon/docker-brew-ubuntu-core/blob/2b105575647a7e2030ff344d427c3920b89e17a9/trusty/Dockerfile)
* [14.10 版本](https://github.com/tianon/docker-brew-ubuntu-core/blob/2b105575647a7e2030ff344d427c3920b89e17a9/utopic/Dockerfile)

View File

@@ -1,19 +0,0 @@
## [WordPress](https://registry.hub.docker.com/_/wordpress/)
### 基本信息
[WordPress](https://en.wikipedia.org/wiki/WordPress) 是开源的 Blog 和内容管理系统框架,它基于 PhP 和 MySQL。
该仓库提供了 WordPress 4.0 版本的镜像
### 使用方法
启动容器需要 MySQL 的支持默认端口为 `80`
```
$ sudo docker run --name some-wordpress --link some-mysql:mysql -d wordpress
```
启动 WordPress 容器时可以指定的一些环境参数包括
* `-e WORDPRESS_DB_USER=...` 缺省为 root
* `-e WORDPRESS_DB_PASSWORD=...` 缺省为连接 mysql 容器的环境变量 `MYSQL_ROOT_PASSWORD` 的值
* `-e WORDPRESS_DB_NAME=...` 缺省为 wordpress
* `-e WORDPRESS_AUTH_KEY=...`, `-e WORDPRESS_SECURE_AUTH_KEY=...`, `-e WORDPRESS_LOGGED_IN_KEY=...`, `-e WORDPRESS_NONCE_KEY=...`, `-e WORDPRESS_AUTH_SALT=...`, `-e WORDPRESS_SECURE_AUTH_SALT=...`, `-e WORDPRESS_LOGGED_IN_SALT=...`, `-e WORDPRESS_NONCE_SALT=...` 缺省为随机 sha1
### Dockerfile
* [4.0 版本](https://github.com/docker-library/wordpress/blob/aee00669e7c43f435f021cb02871bffd63d5677a/Dockerfile)

View File

@@ -1,7 +0,0 @@
# 资源链接
* Docker 主站点: https://www.docker.io
* Docker 注册中心API: http://docs.docker.com/reference/api/registry_api/
* Docker Hub API: http://docs.docker.com/reference/api/docker-io_api/
* Docker 远端应用API: http://docs.docker.com/reference/api/docker_remote_api/
* Dockerfile 参考https://docs.docker.com/reference/builder/
* Dockerfile 最佳实践https://docs.docker.com/articles/dockerfile_best-practices/

View File

@@ -1,8 +1,7 @@
# 基本概念
Docker 包括三个基本概念
* 镜像Image
* 容器Container
* 仓库Repository
理解了这三个概念就理解了 Docker 的整个生命周期
# Basic Concepts
Docker contains 3 basic concepts
* `Image`
* `Container`
* `Repository`
Only after knowing the above 3 concepts will we get a deeper understanding of the lifecyle of docker.

View File

@@ -1,8 +1,13 @@
## Docker 容器
Docker 利用容器Container来运行应用
## Docker Container
容器是从镜像创建的运行实例它可以被启动开始停止删除每个容器都是相互隔离的保证安全的平台
The relationship between `Image` and `Container` is just as `Class` and `Instance` in [OOP](https://en.wikipedia.org/wiki/Object-oriented_programming). `Image` is the static definition of `container`, while `containers` are the `images` in running state. `Containers` can be created, started, paused, deleted or stopped.
可以把容器看做是一个简易版的 Linux 环境包括root用户权限进程空间用户空间和网络空间等和运行在其中的应用程序
The essence of `container` is `process`, but different from that in the host OS, the container processes run in their individual [`namespaces`](https://en.wikipedia.org/wiki/Linux_namespaces). With the namespace, a container can have its own `root` filesystem, network configurations, process space and even an ID space for users. The processes in a container run in an isolated environment, thus can be used as if it were an individual OS independent of the host OS. This feature makes docker-encapsulated applications safer than those running directly on the host. And that's also an important factor that confuses the novices to tell it from virtual machines.
*镜像是只读的容器在启动的时候创建一层可写层作为最上层
As we've discussed, `multi-layered filesystem` is applied to images, and so as the containers. When a container is running, it is based on its image, with a writable layer created on top of it. We call this layer prepared for R/W at runtime [**`Container Layer`**](https://docs.docker.com/storage/storagedriver/#images-and-layers).
The lifecyle of the container layer is the same as contaier. The container layer dies as soon as the container dies. Therefore, anything stored at the container layer will be discarded when the container is deleted.
As recommended by the [Docker Development Best Practices](https://docs.docker.com/develop/dev-best-practices/#where-and-how-to-persist-application-data), we should not write any data to the container layer to make it stateless. All file write operations should adhere to [`Volume`](../data_management/volume.md) or bind mounts. Writing to volume or bind mounts skips the container layer and R/W to host storage(or network storage) directly, which achieves better performance and stability.
The lifecyle of volume is independent of the container, and will not vanish when the container is deleted. In light of it, the data persists when a container is deleted or restarted.

View File

@@ -1,8 +1,15 @@
## Docker 镜像
Docker 镜像Image就是一个只读的模板
## Docker Image
例如一个镜像可以包含一个完整的 ubuntu 操作系统环境里面仅安装了 Apache 或用户需要的其它应用程序
As we all know, Operating System consists of kernel space and user space. For linux, it will mount `root` filesystem to support user space. For Docker Image, it is similar to a `root` filesystem in Linux. For example, the offical image `ubuntu:18:04` contains a micro `root` filesystem of complete opreating system.
镜像可以用来创建 Docker 容器
Docker Image is a special filesystem. Apart from programs, libs, resources and config which support running container, Docker Image also includes config parameters like anonymous volumes, environment variables, users and others. Images don't have any dynamic data. Its content will not be changed after build.
Docker 提供了一个很简单的机制来创建镜像或者更新现有的镜像用户甚至可以直接从其他人那里下载一个已经做好的镜像来直接使用
## Advanced Multi-layered Unification Filesystem (AUFS)
Because the image contains the complete `root` file system of the operating system, its volume is often huge. So Docker made full use of [Union FS](https://en.wikipedia.org/wiki/Union_mount) and was designed as AUFS when it was designed. So strictly speaking, image is not a packaged file like an ISO image file. Image is just a virtual concept. It is not composed of a single file, but a group of file systems, or a combination of multi-layered filesystems.
When building an image, it builds layer by layer, and the former is the basis for the latter. Once each layer is built, it will not change later. Any change on the latter layer will only occur on its own level. For example, deleting the previous layer of files is not really deleting the files, but only marked as deleted in the current layer. When the final container runs, you won't see the file, but in fact the file will always follow the image. Therefore, take more care when building the image, and any redundant file should be cleared up in ahead of the layer's final construction.
The layered storage feature also makes it easier to reuse and customize images. You can even use a previously built image as the base layer, and then add a new layer to customize the content to meet your need to build a new image.
As for image building, further explanations will be given in subsequent relevant chapters.

View File

@@ -1,15 +1,29 @@
## Docker 仓库
## Docker Registry
仓库Repository是集中存放镜像文件的场所有时候会把仓库和仓库注册服务器Registry混为一谈并不严格区分实际上仓库注册服务器上往往存放着多个仓库每个仓库中又包含了多个镜像每个镜像有不同的标签tag
After the construction of an image, we can easily run it on a host. However, if we want to use the image on other servers, we need a centralized image storage and distribution service. The [Docker Registry](../repository/registry.md) we will introduce is such a service.
仓库分为公开仓库Public和私有仓库Private两种形式
A **Docker Registry** can contain several `Repositories`, where each repository can contain several tags and each tag corresponds to an image.
最大的公开仓库是 [Docker Hub](https://hub.docker.com),存放了数量庞大的镜像供用户下载。
Typically, a repository contains images for different versions of the same software, where each tags corresponds to different versions of the software. We can uniquely identify an image of the same software with `repository:tag`. In case not explicitly specified, `latest` is taken as default tag.
国内的公开仓库包括 [时速云](https://hub.tenxcloud.com/) 、[网易云](https://c.163.com/hub) 等,可以提供大陆用户更稳定快速的访问。
Taking the [Ubuntu Image](https://hub.docker.com/_/ubuntu) as an example. `ubuntu` is the name for repository, and inside it are tags for different versions, for instance, `16.04`, `18.04`. We can use `ubuntu:16.04` or `ubuntu:18.04` to specify the particular image we want. If the tag is omitted, for example, `ubuntu`, then it will be considered as `ubuntu:latest`.
当然用户也可以在本地网络内创建一个私有仓库参考本文私有仓库部分
Repository name is typically seperated by a forward slash(/), for example, `jwilder/nginx-proxy`, the former is to identify a particular user in a multi-user Docker Registry, while the latter corresponds to the software name. But it is not always the case. It also depends on the Docker Registry software or service you are using.
当用户创建了自己的镜像之后就可以使用 `push` 命令将它上传到公有或者私有仓库这样下次在另外一台机器上使用这个镜像时候只需要从仓库上 `pull` 下来就可以了
### Docker Registry Public Services
*Docker 仓库的概念跟 [Git](http://git-scm.com) 类似,注册服务器可以理解为 GitHub 这样的托管服务。
`Docker Registry Public Services` are registry services open to users, allowing users to manage their images. Typically, those public services offer user free image uploads and downloads, and possibly provide charged service for privately managed images.
The most commonly used registry public service is the official [Docker Hub](https://hub.docker.com/), which is the default registry with thousands of high quality official images. Besides, the images for [Quay.io](https://quay.io/repository/) and CoreOS of [CoreOS](https://coreos.com/) are stored there. Google's [Google Container Registry](https://cloud.google.com/container-registry/) and [Kubernetes](https://kubernetes.io/) also use this service.
Due to some reasons knwon to all, accessing those services from China mainland is slow. There are some cloud service providers in China providing `Registry Mirror` for Docker Hub, those mirror services are called `accelerators`. The well-known ones are [Ali Cloud Image Accelerator](https://cr.console.aliyun.com/#/accelerator) and [DaoCloud Accelerator](https://www.daocloud.io/mirror#accelerator-doc). In China, downloading from these services are much faster than from Docker Hub. The detailed image source configuration tutorial is in the [Docker Installation](../install/mirror.md) section.
There are also some cloud service providers that provide public services similar to Docker Hub in China. For example, [Tenxcloud Mirror Registry](https://hub.tenxcloud.com/), [NetEase Mirror Registry](https://c.163.com/hub#/m/library/), [DaoCloud Mirror Market](https://hub.daocloud.io/), [Ali Cloud Mirror Registry](https://cr.console.aliyun.com), etc.
### Private Docker Registry
Apart from using public service, a user can set up private Docker Registry. Docker offical offers the [Docker Registry](https://hub.docker.com/_/registry/) docker image, which can be deployed for private registry service. We will explain how to set it up in detail in the [Private Registry](../repository/registry.md) section.
The open source Docker Registry image only provides the backend of [Docker Registry API](https://docs.docker.com/registry/spec/api/), which supports the `docker` commands and is enough for personal use, although the advanced functionalities like GUI(Graphical User Interface), Image Maintenance and Access Control are not supported. However, they are provided in the commercial version - [Docker Trusted Registry](https://docs.docker.com/datacenter/dtr/2.0/).
Except for the official Docker Registry, there are third-party softwares that implement Docker Registry API, even with some advanced features like user interface. For example, [Harbor](https://github.com/goharbor/harbor) and [Sonatype Nexus](../repository/nexus3_registry.md).

View File

@@ -1 +1,36 @@
{}
{
"title": "Docker Practice",
"author": "yeasy",
"language": "en",
"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": "Image _PAGE_LEVEL_._PAGE_IMAGE_NUMBER_ - _CAPTION_"
},
"github": {
"url": "https://github.com/yeasy/docker_practice"
},
"editlink": {
"base": "https://github.com/yeasy/docker_practice/blob/english/"
},
"page-treeview": {
"copyright": "Copyright &#169; yeasy",
"minHeaderCount": "2",
"minHeaderDeep": "2"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

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