Compare commits

...

289 Commits

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

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

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

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

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

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

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

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

View File

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

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

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

View File

@ -1,17 +1,15 @@
workspace:
base: /srv/gitbook-src
path: .
pipeline:
build:
image: yeasy/docker_practice:latest
# pull: true
environment:
- TZ=Asia/Shanghai
secrets: [key1, key2]
commands:
# - echo $${key1}
# - echo $KEY2
- docker-entrypoint.sh build
when:
event: [push, pull_request, tag, deployment]
branch: master
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

View File

@ -1,4 +1,4 @@
# EditorConfig is awesome: http://EditorConfig.org
# EditorConfig is awesome: https://EditorConfig.org
root = true

2
.gitattributes vendored
View File

@ -2,4 +2,4 @@
*.sh text eol=lf
*.py linguist-language=go
* linguist-language=go

39
.github/CODEOWNERS vendored Normal file
View File

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

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

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

View File

@ -12,22 +12,20 @@ about: Create a report to help us improve
* [x] Linux
* [x] CentOS 7
* [x] Ubuntu 14.04
* [x] Fedora
* [x] Ubuntu 16.04 +
* [x] Debian 7
* [x] Debian 8 +
* [x] CoreOS
* [x] Debian 9 +
* [x] macOS
* [x] Windows 10
* [x] Raspberry Pi (ARM)
* [x] Others (Pls describe below)
### Docker Version
<!-- Docker 18.09 Docker -->
<!--if Docker version under 18.09, please upgrade Docker to 18.09-->
<!-- Docker 20.10 Docker -->
<!--if Docker version under 20.10, please upgrade Docker to 20.10-->
* [x] Edge (v18.09)
* [x] Stable (v18.09)
* [x] Test (v20.10)
* [x] Stable (v20.10)
* [x] 1.13.0 or Before
### Problem Description

View File

@ -12,22 +12,20 @@ about: Create a issue about Docker
* [x] Linux
* [x] CentOS 7
* [x] Ubuntu 14.04
* [x] Fedora
* [x] Ubuntu 16.04 +
* [x] Debian 7
* [x] Debian 8 +
* [x] CoreOS
* [x] Debian 9 +
* [x] macOS
* [x] Windows 10
* [x] Raspberry Pi (ARM)
* [x] Others (Pls describe below)
### Docker Version
<!-- Docker 18.09 Docker -->
<!--if Docker version under 18.09, please upgrade Docker to 18.09-->
<!-- Docker 20.10 Docker -->
<!--if Docker version under 20.10, please upgrade Docker to 20.10-->
* [x] Edge (v18.09)
* [x] Stable (v18.09)
* [x] Test (v20.10)
* [x] Stable (v20.10)
* [x] 1.13.0 or Before
### Problem Description

View File

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

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

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

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

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

4
.gitignore vendored
View File

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

View File

@ -1,44 +0,0 @@
language: bash
sudo: required
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:1.13.8-alpine" >> Dockerfile
- echo "COPY _book /usr/share/nginx/html" >> Dockerfile
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t dockerpracticecn/docker_practice .
- docker run -dit --rm -p 4000:80 dockerpracticecn/docker_practice
- sleep 5
- curl 127.0.0.1:4000
- docker push dockerpracticecn/docker_practice
- cd _book
- git init
- git remote add origin "$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: pages
# - DEPLOY_BRANCH: legacy-pages
- REPO: git@github.com:yeasy/docker_practice.git
addons:
ssh_known_hosts:
- github.com
branches:
only:
- master
- dev
# - docker-legacy

View File

@ -1,4 +1,4 @@
FROM node:9-alpine
FROM node:14.4.0-alpine
ENV TZ=Asia/Shanghai
@ -8,8 +8,8 @@ COPY book.json book.json
COPY docker-entrypoint.sh /usr/local/bin/
RUN apk add --no-cache \
tzdata \
RUN set -x && apk add --no-cache \
tzdata bash \
&& npm install -g gitbook-cli \
&& gitbook install \
&& ln -s /usr/local/bin/docker-entrypoint.sh / \

View File

@ -11,7 +11,7 @@
"-livereload",
"image-captions",
"github",
"page-treeview",
"page-treeview@2.9.8",
"editlink"
],
"pluginsConfig": {

View File

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

Binary file not shown.

3
.vuepress/.gitignore vendored Normal file
View File

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

462
.vuepress/config.js Normal file
View File

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

View File

@ -1,8 +1,23 @@
##
#
* 1.3.0 2021-YY-DD
* Docker v20.10
* Docker Compose v2
* Docker Hub
* 1.2.0 2020-12-20
*
* 1.1.0 2019-12-31
* Docker v19.03
* `BuildKit`
* `docker buildx` 使
* `docker manifest` 使
* `Ubuntu 14.04` `Debian 8` `Debian 7`
* 1.0.0: 2018-12-31
* v18.x
* Docker
* Docker v18.x
* Docker
*
* 0.9.0: 2017-12-31

View File

@ -1,4 +1,4 @@
##
#
[Issue](https://github.com/yeasy/docker_practice/issues),如 [issue 235](https://github.com/yeasy/docker_practice/issues/235),添加自己为 `Assignee`。

View File

@ -1,20 +1,21 @@
# Docker
[![](https://img.shields.io/github/stars/yeasy/docker_practice.svg?style=social&label=Stars)](https://github.com/yeasy/docker_practice) ![](https://img.shields.io/docker/pulls/yeasy/docker_practice.svg) [![](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://badges.gitter.im/docker_practice/Lobby.svg)](https://gitter.im/docker_practice/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![](https://img.shields.io/github/stars/yeasy/docker_practice.svg?style=social&label=Stars)](https://github.com/yeasy/docker_practice) [![](https://img.shields.io/github/release/yeasy/docker_practice/all.svg)](https://github.com/yeasy/docker_practice/releases) [![](https://img.shields.io/badge/Based-Docker%20CE%20v20.10-blue.svg)](https://github.com/docker/docker-ce) [![](https://img.shields.io/badge/Docker%20%E6%8A%80%E6%9C%AF%E5%85%A5%E9%97%A8%E4%B8%8E%E5%AE%9E%E6%88%98-jd.com-red.svg)][1]
v1.0.0
**v1.3.0**
* 0.9.0 Docker CE v18.X Docker 1.13-使 [docker-legacy](https://github.com/yeasy/docker_practice/tree/docker-legacy) 分支。*
| | - |
| :------------- | :--- |
| [](https://github.com/yeasy/docker_practice) | [阅读](https://vuepress.mirror.docker-practice.com/) |
[Docker](http://www.docker.com) 是个划时代的开源项目,它彻底释放了计算虚拟化的威力,极大提高了应用的维护效率,降低了云计算应用开发的成本!使用 Docker可以让应用的部署、测试和分发都变得前所未有的高效和轻松
[Docker](https://www.docker.com) 是个划时代的开源项目,它彻底释放了计算虚拟化的威力,极大提高了应用的维护效率,降低了云计算应用开发的成本!使用 Docker可以让应用的部署、测试和分发都变得前所未有的高效和轻松
Docker
Linux Docker Docker 7 ~ 9 10 ~ 13 1415 Docker EtcdCoreOSKubernetesMesos使
Linux Docker Docker 7 ~ 9 10 ~ 12 1314 Docker EtcdFedora CoreOSKubernetes使
* 线[GitBook](https://yeasy.gitbooks.io/docker_practice/content/)[Github](https://github.com/yeasy/docker_practice/blob/master/SUMMARY.md)[国内镜像](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)
* [线](https://github.com/yeasy/docker_practice/wiki/%E7%A6%BB%E7%BA%BF%E9%98%85%E8%AF%BB%E5%8A%9F%E8%83%BD%E8%AF%A6%E8%A7%A3)
* 线[docker-practice.com](https://vuepress.mirror.docker-practice.com/)[GitBook](https://yeasy.gitbook.io/docker_practice/)[Github](https://github.com/yeasy/docker_practice/blob/master/SUMMARY.md)
* 线[`$ docker run -it --rm -p 4000:80 ccr.ccs.tencentyun.com/dockerpracticesig/docker_practice:vuepress`](https://github.com/yeasy/docker_practice/wiki/%E7%A6%BB%E7%BA%BF%E9%98%85%E8%AF%BB%E5%8A%9F%E8%83%BD%E8%AF%A6%E8%A7%A3)
Docker 使 Docker [](CONTRIBUTING.md)
@ -24,12 +25,19 @@ Docker 自身仍在快速发展中,生态环境也在蓬勃成长。建议初
##
<p align="center">
<img width="200" src="https://user-images.githubusercontent.com/16733187/49682252-3ac4c500-faec-11e8-86ab-eafe0139be6b.jpg">
<img width="200" src="https://docker_practice.gitee.io/pic/dp-wechat-miniprogram.jpg">
</p>
<p align="center"><strong> ~</strong></p>
##
<p align="center">
<img width="200" src="https://docker_practice.gitee.io/pic/dpsig-wechat.jpg">
</p>
<p align="center"><strong> ~ <code>dpsigs</code> </strong></p>
Docker QQ Docker Docker
* QQ I 341410255
@ -41,16 +49,17 @@ Docker 自身仍在快速发展中,生态环境也在蓬勃成长。建议初
* QQ VII 252403484
* QQ VIII544818750
* QQ IX 571502246
* QQ X   145983035
* QQ X 145983035
> [Issues](https://github.com/yeasy/docker_practice/issues/new/choose) 来提出。
> [Issues](https://github.com/yeasy/docker_practice/issues/new/choose) 来提出。
##
![](_images/docker_primer3.png)
[Docker ](http://item.jd.com/12453318.html)》第三版已经面世,介绍最新的容器技术栈,欢迎大家阅读使用并反馈建议。
[![](https://github.com/yeasy/docker_practice/raw/master/_images/docker_primer3.png)][1]
* [](https://item.jd.com/12453318.html)
[Docker ][1]使
* [][1]
* [China-Pub](http://product.china-pub.com/8052127)
##
@ -60,3 +69,5 @@ Docker 自身仍在快速发展中,生态环境也在蓬勃成长。建议初
</p>
<p align="center"><strong> coffee~</strong></p>
[1]: https://union-click.jd.com/jdc?e=&p=JF8AANADIgZlGF0VAxUDVBJdHDISBFAfWRcCGzcRRANLXSJeEF4aVwkMGQ1eD0kdSVJKSQVJHBIEUB9ZFwIbGAxeB0gyS34PbFlHVHNkI0MQEAoIcSxyBWFLRAtZK1olABYHXR9eHAoQN2UbXCVQfN_jrYOwsw7T_5SOnZUiBmUbXBYBFwBVG14UBBAAZRxbHDJJUjscCEEHEQ4FSA4VBhBQZStrFjIiN1UrWCVAfARQT1gQA0cFAEwOEAcRDlMTDEALQAFTEwwRUhMAUR1cJQATBlES

View File

@ -4,158 +4,169 @@
* [](CHANGELOG.md)
* [](CONTRIBUTING.md)
* [Docker ](introduction/README.md)
* [ Docker](introduction/what.md)
* [ Docker](introduction/why.md)
* [ Docker](introduction/what.md)
* [ Docker](introduction/why.md)
* [](basic_concept/README.md)
* [](basic_concept/image.md)
* [](basic_concept/container.md)
* [](basic_concept/repository.md)
* [](basic_concept/image.md)
* [](basic_concept/container.md)
* [](basic_concept/repository.md)
* [ Docker](install/README.md)
* [Ubuntu](install/ubuntu.md)
* [Debian](install/debian.md)
* [Fedora](install/fedora.md)
* [CentOS](install/centos.md)
* [Raspberry Pi](install/raspberry-pi.md)
* [macOS](install/mac.md)
* [Windows PC](install/windows.md)
* [](install/mirror.md)
* [Ubuntu](install/ubuntu.md)
* [Debian](install/debian.md)
* [Fedora](install/fedora.md)
* [CentOS](install/centos.md)
* [Raspberry Pi](install/raspberry-pi.md)
* [Linux 线](install/offline.md)
* [macOS](install/mac.md)
* [Windows 10](install/windows.md)
* [](install/mirror.md)
* [](install/experimental.md)
* [使](image/README.md)
* [](image/pull.md)
* [](image/list.md)
* [](image/rm.md)
* [ commit ](image/commit.md)
* [使 Dockerfile ](image/build.md)
* [Dockerfile ](image/dockerfile/README.md)
* [COPY ](image/dockerfile/copy.md)
* [ADD ](image/dockerfile/add.md)
* [CMD ](image/dockerfile/cmd.md)
* [ENTRYPOINT ](image/dockerfile/entrypoint.md)
* [ENV ](image/dockerfile/env.md)
* [ARG ](image/dockerfile/arg.md)
* [VOLUME ](image/dockerfile/volume.md)
* [EXPOSE ](image/dockerfile/expose.md)
* [WORKDIR ](image/dockerfile/workdir.md)
* [USER ](image/dockerfile/user.md)
* [HEALTHCHECK ](image/dockerfile/healthcheck.md)
* [ONBUILD ](image/dockerfile/onbuild.md)
* [](image/dockerfile/references.md)
* [Dockerfile ](image/multistage-builds.md)
* [](image/other.md)
* [](image/internal.md)
* [](image/pull.md)
* [](image/list.md)
* [](image/rm.md)
* [ commit ](image/commit.md)
* [使 Dockerfile ](image/build.md)
* [Dockerfile ](image/dockerfile/README.md)
* [COPY ](image/dockerfile/copy.md)
* [ADD ](image/dockerfile/add.md)
* [CMD ](image/dockerfile/cmd.md)
* [ENTRYPOINT ](image/dockerfile/entrypoint.md)
* [ENV ](image/dockerfile/env.md)
* [ARG ](image/dockerfile/arg.md)
* [VOLUME ](image/dockerfile/volume.md)
* [EXPOSE ](image/dockerfile/expose.md)
* [WORKDIR ](image/dockerfile/workdir.md)
* [USER ](image/dockerfile/user.md)
* [HEALTHCHECK ](image/dockerfile/healthcheck.md)
* [ONBUILD ](image/dockerfile/onbuild.md)
* [LABEL ](image/dockerfile/label.md)
* [SHELL ](image/dockerfile/shell.md)
* [](image/dockerfile/references.md)
* [Dockerfile ](image/multistage-builds/README.md)
* [ Laravel ](image/multistage-builds/laravel.md)
* [ Docker ](image/manifest.md)
* [](image/other.md)
* [](image/internal.md)
* [](container/README.md)
* [](container/run.md)
* [](container/daemon.md)
* [](container/stop.md)
* [](container/attach_exec.md)
* [](container/import_export.md)
* [](container/rm.md)
* [](container/run.md)
* [](container/daemon.md)
* [](container/stop.md)
* [](container/attach_exec.md)
* [](container/import_export.md)
* [](container/rm.md)
* [访](repository/README.md)
* [Docker Hub](repository/dockerhub.md)
* [](repository/registry.md)
* [](repository/registry_auth.md)
* [Nexus 3](repository/nexus3_registry.md)
* [Docker Hub](repository/dockerhub.md)
* [](repository/registry.md)
* [](repository/registry_auth.md)
* [Nexus 3](repository/nexus3_registry.md)
* [](data_management/README.md)
* [](data_management/volume.md)
* [](data_management/bind-mounts.md)
* [](data_management/volume.md)
* [](data_management/bind-mounts.md)
* [使](network/README.md)
* [访](network/port_mapping.md)
* [](network/linking.md)
* [ DNS](network/dns.md)
* [访](network/port_mapping.md)
* [](network/linking.md)
* [ DNS](network/dns.md)
* [](advanced_network/README.md)
* [](advanced_network/quick_guide.md)
* [访](advanced_network/access_control.md)
* [](advanced_network/port_mapping.md)
* [ docker0 ](advanced_network/docker0.md)
* [](advanced_network/bridge.md)
* [](advanced_network/example.md)
* [](advanced_network/config_file.md)
* [](advanced_network/ptp.md)
* [Docker Compose ](compose/README.md)
* [](compose/introduction.md)
* [](compose/install.md)
* [使](compose/usage.md)
* [](compose/commands.md)
* [Compose ](compose/compose_file.md)
* [ Django](compose/django.md)
* [ Rails](compose/rails.md)
* [ WordPress](compose/wordpress.md)
* [Docker Machine ](machine/README.md)
* [](machine/install.md)
* [使](machine/usage.md)
* [Docker Docker Swarm](swarm/README.md)
* [](advanced_network/quick_guide.md)
* [访](advanced_network/access_control.md)
* [](advanced_network/port_mapping.md)
* [ docker0 ](advanced_network/docker0.md)
* [](advanced_network/bridge.md)
* [](advanced_network/example.md)
* [](advanced_network/config_file.md)
* [ HTTP/HTTPS ](advanced_network/http_https_proxy.md)
* [](advanced_network/ptp.md)
* [Docker Buildx](buildx/README.md)
* [BuildKit](buildx/buildkit.md)
* [使 buildx ](buildx/buildx.md)
* [使 buildx Docker ](buildx/multi-arch-images.md)
* [Docker Compose](compose/README.md)
* [](compose/introduction.md)
* [Compose v2](compose/v2.md)
* [](compose/install.md)
* [使](compose/usage.md)
* [](compose/commands.md)
* [Compose ](compose/compose_file.md)
* [ Django](compose/django.md)
* [ Rails](compose/rails.md)
* [ WordPress](compose/wordpress.md)
* [ LNMP](compose/lnmp.md)
* [Swarm mode](swarm_mode/README.md)
* [](swarm_mode/overview.md)
* [ Swarm ](swarm_mode/create.md)
* [](swarm_mode/deploy.md)
* [使 compose ](swarm_mode/stack.md)
* [](swarm_mode/secret.md)
* [](swarm_mode/config.md)
* [](swarm_mode/rolling_update.md)
* [](swarm_mode/overview.md)
* [ Swarm ](swarm_mode/create.md)
* [](swarm_mode/deploy.md)
* [使 compose ](swarm_mode/stack.md)
* [](swarm_mode/secret.md)
* [](swarm_mode/config.md)
* [](swarm_mode/rolling_update.md)
* [](security/README.md)
* [](security/kernel_ns.md)
* [](security/control_group.md)
* [](security/daemon_sec.md)
* [](security/kernel_capability.md)
* [](security/other_feature.md)
* [](security/summary.md)
* [](security/kernel_ns.md)
* [](security/control_group.md)
* [](security/daemon_sec.md)
* [](security/kernel_capability.md)
* [](security/other_feature.md)
* [](security/summary.md)
* [](underly/README.md)
* [](underly/arch.md)
* [](underly/namespace.md)
* [](underly/cgroups.md)
* [](underly/ufs.md)
* [](underly/container_format.md)
* [](underly/network.md)
* [](underly/arch.md)
* [](underly/namespace.md)
* [](underly/cgroups.md)
* [](underly/ufs.md)
* [](underly/container_format.md)
* [](underly/network.md)
* [Etcd ](etcd/README.md)
* [](etcd/intro.md)
* [](etcd/install.md)
* [](etcd/cluster.md)
* [使 etcdctl](etcd/etcdctl.md)
* [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 ](mesos/intro.md)
* [使](mesos/installation.md)
* [](mesos/architecture.md)
* [Mesos ](mesos/configuration.md)
* [](mesos/monitor.md)
* [](mesos/framework.md)
* [](mesos/summary.md)
* [](etcd/intro.md)
* [](etcd/install.md)
* [](etcd/cluster.md)
* [使 etcdctl](etcd/etcdctl.md)
* [Fedora CoreOS](coreos/README.md)
* [](coreos/intro.md)
* [](coreos/install.md)
* [Kubernetes - ](kubernetes/README.md)
* [](kubernetes/intro.md)
* [](kubernetes/concepts.md)
* [](kubernetes/design.md)
* [ Kubernetes](kubernetes/setup/README.md)
* [使 kubeadm kubernetes(CRI 使 containerd)](kubernetes/setup/kubeadm.md)
* [ Docker Desktop 使](kubernetes/setup/docker-desktop.md)
* [ kubernetes ](kubernetes/setup/systemd.md)
* [ Dashboard](kubernetes/setup/dashboard.md)
* [Kubernetes kubectl](kubernetes/kubectl/README.md)
* [](cloud/README.md)
* [](cloud/intro.md)
* [](cloud/aws.md)
* [](cloud/qcloud.md)
* [](cloud/alicloud.md)
* [](cloud/summary.md)
* [-](cases/os/README.md)
* [Busybox](cases/os/busybox.md)
* [Alpine](cases/os/alpine.md)
* [Debian Ubuntu](cases/os/debian.md)
* [CentOS Fedora](cases/os/centos.md)
* [](cases/os/summary.md)
* [-CI/CD](cases/ci/README.md)
* [Drone](cases/ci/drone.md)
* [Docker ](opensource/README.md)
* [LinuxKit](opensource/linuxkit.md)
* [](cloud/intro.md)
* [](cloud/tencentCloud.md)
* [](cloud/alicloud.md)
* [](cloud/aws.md)
* [](cloud/summary.md)
* [ - ](cases/os/README.md)
* [Busybox](cases/os/busybox.md)
* [Alpine](cases/os/alpine.md)
* [Debian Ubuntu](cases/os/debian.md)
* [CentOS Fedora](cases/os/centos.md)
* [](cases/os/summary.md)
* [ - CI/CD](cases/ci/README.md)
* [GitHub Actions](cases/ci/actions/README.md)
* [Drone](cases/ci/drone/README.md)
* [ Drone](cases/ci/drone/install.md)
* [ IDE 使 Docker](ide/README.md)
* [VS Code](ide/vsCode.md)
* [podman - Linux ](podman/README.md)
* [](appendix/README.md)
* [](appendix/faq/README.md)
* [](appendix/repo/README.md)
* [Ubuntu](appendix/repo/ubuntu.md)
* [CentOS](appendix/repo/centos.md)
* [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)
* [Docker ](appendix/command/README.md)
* [Dockerfile ](appendix/best_practices.md)
* [ Docker](appendix/debug.md)
* [](appendix/resources.md)
* [](appendix/faq/README.md)
* [](appendix/repo/README.md)
* [Ubuntu](appendix/repo/ubuntu.md)
* [CentOS](appendix/repo/centos.md)
* [Nginx](appendix/repo/nginx.md)
* [PHP](appendix/repo/php.md)
* [Node.js](appendix/repo/nodejs.md)
* [MySQL](appendix/repo/mysql.md)
* [WordPress](appendix/repo/wordpress.md)
* [MongoDB](appendix/repo/mongodb.md)
* [Redis](appendix/repo/redis.md)
* [Minio](appendix/repo/minio.md)
* [Docker ](appendix/command/README.md)
* [ - docker](appendix/command/docker.md)
* [ - dockerd](appendix/command/dockerd.md)
* [Dockerfile ](appendix/best_practices.md)
* [ Docker](appendix/debug.md)
* [](appendix/resources.md)

View File

@ -6,10 +6,10 @@
Docker `docker0` Linux bridge
Docker [RFC1918](http://tools.ietf.org/html/rfc1918) 中定义)中的一个地址给 `docker0` 接口。比如典型的 `172.17.42.1`,掩码为 `255.255.0.0`。此后启动的容器内的网口也会自动分配一个同一网段(`172.17.0.0/16`)的地址。
Docker [RFC1918](https://datatracker.ietf.org/doc/html/rfc1918) 中定义)中的一个地址给 `docker0` 接口。比如典型的 `172.17.42.1`,掩码为 `255.255.0.0`。此后启动的容器内的网口也会自动分配一个同一网段(`172.17.0.0/16`)的地址。
Docker `veth pair` `eth0` `docker0` `veth` `vethAQI2QT`Docker
![Docker ](_images/network.png)
![Docker ](./_images/network.png)
Docker Linux Docker

View File

@ -1,7 +1,8 @@
## 访
# 访
访 Linux `iptables` `iptables` Linux
### 访
## 访
访Linux
```bash
@ -14,17 +15,17 @@ $sysctl -w net.ipv4.ip_forward=1
```
Docker `--ip-forward=true`, Docker `ip_forward` 1
### 访
## 访
访
* `docker0`
* -- `iptables`
#### 访
### 访
Docker dockerd iptables FORWARD `ACCEPT``DROP``--icc=true` `--icc=false` `--iptables=false` `iptables`
`/etc/docker/daemon.json` `{"icc": false}` Ubuntu 14.04 使 upstart `/etc/default/docker` `DOCKER_OPTS=--icc=false`
`/etc/docker/daemon.json` `{"icc": false}`
#### 访
### 访
`-icc=false` 访 `--link=CONTAINER_NAME:ALIAS` 访
Docker 使 `icc=false --iptables=true` 访 Docker `iptables`

View File

@ -1,4 +1,4 @@
##
#
`docker0`

View File

@ -1,4 +1,4 @@
##
#
Docker 1.2.0 `/etc/hosts`, `/etc/hostname` `/etc/resolv.conf`

View File

@ -1,4 +1,4 @@
## docker0
# docker0
Docker `docker0` `docker0`

View File

@ -1,8 +1,9 @@
##
#
### pipework
## pipework
Jérôme Petazzoni [pipework](https://github.com/jpetazzo/pipework) 的 shell 脚本,可以帮助用户在比较复杂的场景中完成容器的连接。
### playground
Brandon Rhodes Docker [Python](https://github.com/brandon-rhodes/fopnp/tree/m/playground)包括路由、NAT 防火墙;以及一些提供 HTTP, SMTP, POP, IMAP, Telnet, SSH, FTP 的服务器。
## playground
Brandon Rhodes Docker [Python](https://github.com/brandon-rhodes/fopnp/tree/m/playground)包括路由、NAT 防火墙;以及一些提供 `HTTP` `SMTP` `POP` `IMAP` `Telnet` `SSH` `FTP` 的服务器。

View File

@ -0,0 +1,74 @@
# HTTP/HTTPS
使Docker使 HTTP/HTTPS 使
## dockerd
"docker pull" dockerd dockerd systemd "docker pull" 使 HTTP/HTTPS systemd
- dockerd
```
sudo mkdir -p /etc/systemd/system/docker.service.d
```
- dockerd HTTP/HTTPS /etc/systemd/system/docker.service.d/http-proxy.conf
```
[Service]
Environment="HTTP_PROXY=http://proxy.example.com:8080/"
Environment="HTTPS_PROXY=http://proxy.example.com:8080/"
Environment="NO_PROXY=localhost,127.0.0.1,.example.com"
```
- docker
```
sudo systemctl daemon-reload
sudo systemctl restart docker
```
## docker
使 HTTP/HTTPS docker
- docker ~/.docker/config.json
```
{
"proxies":
{
"default":
{
"httpProxy": "http://proxy.example.com:8080/",
"httpsProxy": "http://proxy.example.com:8080/",
"noProxy": "localhost,127.0.0.1,.example.com"
}
}
}
```
- "docker run"
| | docker run |
| -------- | ---------------- |
| HTTP_PROXY | --env HTTP_PROXY="http://proxy.example.com:8080/" |
| HTTPS_PROXY | --env HTTPS_PROXY="http://proxy.example.com:8080/" |
| NO_PROXY | --env NO_PROXY="localhost,127.0.0.1,.example.com" |
## docker build
使 HTTP/HTTPS "docker build" Dockerfile
- 使 "--build-arg" "docker build"
```
docker build \
--build-arg "HTTP_PROXY=http://proxy.example.com:8080/" \
--build-arg "HTTPS_PROXY=http://proxy.example.com:8080/" \
--build-arg "NO_PROXY=localhost,127.0.0.1,.example.com" .
```
- Dockerfile
| | Dockerfile |
| -------- | ---------------- |
| HTTP_PROXY | ENV HTTP_PROXY="http://proxy.example.com:8080/" |
| HTTPS_PROXY | ENV HTTPS_PROXY="http://proxy.example.com:8080/" |
| NO_PROXY | ENV NO_PROXY="localhost,127.0.0.1,.example.com" |

View File

@ -1,8 +1,8 @@
## 宿
# 宿
访访
### 访
## 访
NAT IP 使 `iptables`
@ -19,7 +19,7 @@ MASQUERADE all -- 172.17.0.0/16 !172.17.0.0/16
`172.17.0.0/16` MASQUERADE SNAT
### 访
## 访
访 `docker run` `-p` `-P`

View File

@ -1,4 +1,4 @@
##
#
Docker `docker0`

View File

@ -1,4 +1,4 @@
##
#
Docker

View File

@ -1,6 +1,6 @@
# Dockerfile
Docker [Best practices for writing Dockerfiles](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/) 的理解与翻译。
Docker [Best practices for writing Dockerfiles](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/) 的理解与翻译。
##
@ -94,7 +94,7 @@ LABEL vendor=ACME\ Incorporated \
com.example.release-date="2015-02-12"
```
[Understanding object labels](https://docs.docker.com/engine/userguide/labels-custom-metadata/)。关于查询标签信息,参考 [Managing labels on objects](https://docs.docker.com/engine/userguide/labels-custom-metadata/#managing-labels-on-objects)。
[Understanding object labels](https://docs.docker.com/config/labels-custom-metadata/)。关于查询标签信息,参考 [Managing labels on objects](https://docs.docker.com/config/labels-custom-metadata/)。
### RUN
@ -167,9 +167,9 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/*
```
`s3cmd` `1.1.*`使 `apt-get udpate`
`s3cmd` `1.1.*`使 `apt-get update`
apt `var/lib/apt/lists` `RUN` `apt-get udpate` `apt-get install`
apt `var/lib/apt/lists` `RUN` `apt-get update` `apt-get install`
> Debian Ubuntu apt-get clean apt-get clean
@ -329,7 +329,7 @@ $ docker run --rm -it postgres bash
使 `USER` root `Dockerfile` 使 `RUN groupadd -r postgres && useradd -r -g postgres postgres`
> UID/GID UID/GID UID/GID UID/GID
> UID/GID UID/GID UID/GID UID/GID
使 `sudo` TTY `sudo` root root 使 [gosu](https://github.com/tianon/gosu)。
@ -339,6 +339,6 @@ $ docker run --rm -it postgres bash
`WORKDIR` 使使 `WORKDIR` `RUN cd ... && do-something`
##
##
Dockerfile https://github.com/docker-library/docs
Dockerfile https://github.com/docker-library/docs

View File

@ -10,120 +10,4 @@ Docker 命令有两大类,客户端命令和服务端命令。前者是主要
`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)

View File

@ -0,0 +1,70 @@
# (docker)
##
* `--config=""` `~/.docker`
* `-D=true|false`使 debug
* `-H, --host=[]` Docker unix `unix:///path/to/socket` `fd://socketfd` tcp `tcp://[host[:port]]` `unix:///var/run/docker.sock`
* `-l, --log-level="debug|info|warn|error|fatal"`
* `--tls=true|false` Docker TLS
* `--tlscacert=/.docker/ca.pem`TLS CA
* `--tlscert=/.docker/cert.pem`TLS
* `--tlscert=/.docker/key.pem`TLS
* `--tlsverify=true|false` TLS
##
`docker COMMAND --help`
* `attach`
* `build` Dockerfile
* `commit`
* `cp`宿
* `create`
* `diff`
* `events`
* `exec`
* `export` `tar`
* `history`
* `images`
* `import` `tar`
* `info`
* `inspect`
* `kill` ()
* `load` tar
* `login` Docker
* `logout` Docker
* `logs` log
* `network` Docker
* `node` swarm /
* `pause`
* `port` nat
* `ps`
* `pull`Docker
* `push` Docker
* `rename`
* `restart`
* `rm`
* `rmi`
* `run`
* `save` tar
* `search` Docker index
* `service` Docker
* `start`
* `stats`使
* `stop`
* `swarm` Docker swarm 退
* `tag`
* `top`
* `unpause`
* `update`
* `version` Docker
* `volume` Docker volume
* `wait`退
## Docker
![Docker ](../_images/cmd_logic.png)
##
* [](https://docs.docker.com/engine/reference/commandline/cli/)

View File

@ -0,0 +1,58 @@
# (dockerd)
## dockerd
* `--api-cors-header=""`CORS CORS访 "*"
* `--authorization-plugin=""`
* `-b=""` `none` `--bip`
* `--bip=""` `docker0` CIDR ; `-b`
* `--cgroup-parent=""` cgroup fs cgroup `/docker`systemd cgroup `system.slice`
* `--cluster-store=""` `Swarm`
* `--cluster-advertise=""`访 `host:port` `interface:port`
* `--cluster-store-opt=""`
* `--config-file="/etc/docker/daemon.json"`daemon
* `--containerd=""`containerd
* `-D, --debug=true|false`使 Debug false
* `--default-gateway=""` IPv4
* `--default-gateway-v6=""` IPv6
* `--default-ulimit=[]` ulimit
* `--disable-legacy-registry=true|false`访
* `--dns=""`使 DNS
* `--dns-opt=""`DNS
* `--dns-search=[]`DNS
* `--exec-opt=[]`
* `--exec-root=""` `/var/run/docker`
* `--fixed-cidr=""` IPv4
* `--fixed-cidr-v6=""` IPv6
* `-G, --group=""` unix `docker`
* `-g, --graph=""`Docker `/var/lib/docker`
* `-H, --host=[]` Docker daemon unix `unix:///path/to/socket` `fd://socketfd` tcp `tcp://[host[:port]]` `unix:///var/run/docker.sock`
* `--icc=true|false` daemon true
* `--insecure-registry=[]`访
* `--ip=""` IP `0.0.0.0`
* `--ip-forward=true|false` Docker IP
* `--ip-masq=true|false`访
* `--iptables=true|false` Docker iptables true
* `--ipv6=true|false` IPv6
* `-l, --log-level="debug|info|warn|error|fatal"`
* `--label="[]"`
* `--log-driver="json-file|syslog|journald|gelf|fluentd|awslogs|splunk|etwlogs|gcplogs|none"` `json-file`
* `--log-opt=[]`
* `--mtu=VALUE` `mtu`
* `-p=""` daemon PID `/var/run/docker.pid`
* `--raw-logs`
* `--registry-mirror=<scheme>://<host>` `docker pull` 使
* `-s, --storage-driver=""`使
* `--selinux-enabled=true|false` SELinux falseSELinux overlay
* `--storage-opt=[]`
* `--tls=true|false` Docker daemon TLS
* `--tlscacert=/.docker/ca.pem`TLS CA
* `--tlscert=/.docker/cert.pem`TLS
* `--tlscert=/.docker/key.pem`TLS
* `--tlsverify=true|false` TLS
* `--userland-proxy=true|false`使 true
* `--userns-remap=default|uid:gid|user:group|user|uid` UID GID
##
* [](https://docs.docker.com/engine/reference/commandline/dockerd/)

View File

@ -21,8 +21,8 @@ $ sudo kill -SIGHUP $(pidof dockerd)
##
```bash
$ sudo dmesag |grep dockerd
$ sudo dmesag |grep runc
$ sudo dmesg |grep dockerd
$ sudo dmesg |grep runc
```
## Docker

View File

@ -12,13 +12,13 @@
###
Docker `/var/lib/docker/` `aufs` `container` `graph` `aufs`
Docker `/var/lib/docker/` `overlay2` `containers` `image` `overlay2`
### Docker
* debian:wheezy debian:stretch
* `alpine`
*
@ -30,7 +30,7 @@
* 使 Dockerfile .dockerignore 使
[Dockerfile ](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/)
[Dockerfile ](../best_practices.md)
### pull http_proxy
@ -52,11 +52,18 @@
### PID
使 `docker inspect --format '{{ .State.Pid }}' <CONTAINER ID or NAME>`
使
```bash
docker inspect --format '{{ .State.Pid }}' <CONTAINER ID or NAME>
```
### IP
使 `docker inspect --format '{{ .NetworkSettings.IPAddress }}' <CONTAINER ID or NAME>`
使
```bash
docker inspect --format '{{ .NetworkSettings.IPAddress }}' <CONTAINER ID or NAME>
```
### IP IP
@ -82,7 +89,7 @@ $ docker run --network=my-net --ip=172.25.3.3 -itd --name=my-container busybox
###
`supervisord` https://docs.docker.com/engine/admin/multi-service_container/ 。
`supervisord` https://docs.docker.com/config/containers/multi-service_container/ 。
### CPU
@ -100,7 +107,7 @@ $ docker run --network=my-net --ip=172.25.3.3 -itd --name=my-container busybox
### Docker
使 `upstart` Ubuntu 14.04 `/etc/default/docker`使 `systemd` Ubuntu 16.04Centos `/etc/docker/daemon.json`
使 `systemd` Ubuntu 16.04Centos `/etc/docker/daemon.json`
### Docker
@ -142,7 +149,7 @@ lrwxrwxrwx. 1 root root 15 11月 17 13:43 docker -> /storage/docker
LXC Linux Docker
*
* AUFS 便
* OverlayFS 便
* Git便
*
* Docker Docker PaaSCI Docker 便

View File

@ -1,12 +1,12 @@
## [CentOS](https://hub.docker.com/_/centos)
# [CentOS](https://hub.docker.com/_/centos)
###
##
[CentOS](https://en.wikipedia.org/wiki/CentOS) 是流行的 Linux 发行版,其软件包大多跟 RedHat 系列保持一致。
`https://hub.docker.com/_/centos` CentOS 5 ~ 7
`https://hub.docker.com/_/centos` CentOS 5 ~ 8
### 使
## 使
CentOS
@ -15,6 +15,6 @@ $ docker run --name centos -it centos bash
bash-4.2#
```
### Dockerfile
## Dockerfile
https://github.com/docker-library/docs/tree/master/centos 查看。

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

@ -0,0 +1,58 @@
# minio
**MinIO** Apache License v2.0 S3 / kb 5T
MinIO , NodeJS, Redis MySQL
[](https://docs.min.io/)
## 使
使
```bash
$ docker run -d -p 9000:9000 -p 9090:9090 minio/minio server /data --console-address ':9090'
```
## 线
###
`minio/minio`
```bash
$ docker save -o minio.tar minio/minio:latest
```
> 使docker save 使image id 使+tag
###
使
```bash
$ docker load minio.tar
```
### minio
- `/mnt/data`
- `MINIO_ROOT_USER`
- `MINIO_ROOT_PASSWORD`
- name,minio1()
- 90009090 , `9009:9000`
```bash
$ sudo docker run -d -p 9000:9000 -p 9090:9090 --name minio1 \
-e "MINIO_ROOT_USER=改成自己需要的" \
-e "MINIO_ROOT_PASSWORD=改成自己需要的" \
-v /mnt/data:/data \
--restart=always \
minio/minio server /data --console-address ':9090'
```
### 访 web
http://x.x.x.x:9090

View File

@ -1,12 +1,12 @@
## [MongoDB](https://hub.docker.com/_/mongo/)
# [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`
@ -29,6 +29,6 @@ $ docker run -it --rm \
sh -c 'exec mongo "$MONGO_PORT_27017_TCP_ADDR:$MONGO_PORT_27017_TCP_PORT/test"'
```
### Dockerfile
## Dockerfile
https://github.com/docker-library/docs/tree/master/mongo 查看。

View File

@ -1,12 +1,12 @@
## [MySQL](https://hub.docker.com/_/mysql/)
# [MySQL](https://hub.docker.com/_/mysql/)
###
##
[MySQL](https://en.wikipedia.org/wiki/MySQL) 是开源的关系数据库实现。
`https://hub.docker.com/_/mysql/` MySQL 5.5 ~ 8.x
### 使
## 使
`3306`
@ -29,6 +29,6 @@ $ docker run -it --rm \
sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'
```
### Dockerfile
## Dockerfile
https://github.com/docker-library/docs/tree/master/mysql 查看

View File

@ -1,12 +1,12 @@
## [Nginx](https://hub.docker.com/_/nginx/)
# [Nginx](https://hub.docker.com/_/nginx/)
###
##
[Nginx](https://en.wikipedia.org/wiki/Nginx) 是开源的高效的 Web 服务器实现,支持 HTTP、HTTPS、SMTP、POP3、IMAP 等协议。
`https://hub.docker.com/_/nginx/` Nginx 1.0 ~ 1.15.x
`https://hub.docker.com/_/nginx/` Nginx 1.0 ~ 1.19.x
### 使
## 使
@ -16,7 +16,7 @@ $ docker run --name some-nginx -v /some/content:/usr/share/nginx/html:ro -d ngin
使 Dockerfile
```bash
```docker
FROM nginx
COPY static-html-directory /usr/share/nginx/html
```
@ -39,10 +39,11 @@ Nginx的默认配置文件路径为 `/etc/nginx/nginx.conf`,可以通过映射
```bash
$ docker run -d \
--name some-nginx \
-v /some/nginx.conf:/etc/nginx/nginx.conf:ro \
-p 8080:80 \
-v /path/nginx.conf:/etc/nginx/nginx.conf:ro \
nginx
```
### Dockerfile
## Dockerfile
https://github.com/docker-library/docs/tree/master/nginx 查看。

View File

@ -1,17 +1,17 @@
## [Node.js](https://hub.docker.com/_/node/)
# [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 ~ 11.x
`https://hub.docker.com/_/node/` Node.js 0.10 ~ 14.x
### 使
## 使
Dockerfile
```bash
FROM node:9
```docker
FROM node:12
# replace this with your application's default port
EXPOSE 8888
```
@ -31,10 +31,10 @@ $ docker run -it --rm \
# -v "$(pwd)":/usr/src/myapp \
--mount type=bind,src=`$(pwd)`,target=/usr/src/myapp \
-w /usr/src/myapp \
node:9-alpine \
node:12-alpine \
node your-daemon-or-script.js
```
### Dockerfile
## Dockerfile
https://github.com/docker-library/docs/tree/master/node 查看。

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

@ -0,0 +1,19 @@
# [PHP](https://hub.docker.com/_/php/)
##
[PHP](https://en.wikipedia.org/wiki/Php)Hypertext Preprocessor 超文本预处理器的字母缩写)是一种被广泛应用的开放源代码的多用途脚本语言,它可嵌入到 HTML 中,尤其适合 web 开发。
`https://hub.docker.com/_/php/` PHP 5.x ~ 8.x
## 使
PHP
```bash
$ docker run -it --rm -v "$PWD":/app -w /app php:alpine php your-script.php
```
## Dockerfile
https://github.com/docker-library/docs/tree/master/php 查看。

View File

@ -1,23 +1,23 @@
## [Redis](https://hub.docker.com/_/redis/)
# [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
`https://hub.docker.com/_/redis/` Redis 3.x ~ 6.x
### 使
## 使
`6379`
```bash
$ docker run --name some-redis -d redis
$ docker run --name some-redis -d -p 6379:6379 redis
```
[](http://redis.io/topics/persistence)。
[](https://redis.io/topics/persistence)。
```bash
$ docker run --name some-redis -d redis redis-server --appendonly yes
$ 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`
@ -37,6 +37,6 @@ $ docker run -it --rm \
sh -c 'exec redis-cli -h "$REDIS_PORT_6379_TCP_ADDR" -p "$REDIS_PORT_6379_TCP_PORT"'
```
### Dockerfile
## Dockerfile
https://github.com/docker-library/docs/tree/master/redis 查看。

View File

@ -1,20 +1,20 @@
## [Ubuntu](https://hub.docker.com/_/ubuntu/)
# [Ubuntu](https://hub.docker.com/_/ubuntu/)
###
##
[Ubuntu](https://en.wikipedia.org/wiki/Ubuntu) 是流行的 Linux 发行版,其自带软件版本往往较新一些。
`https://hub.docker.com/_/ubuntu/` Ubuntu 12.04 ~ 18.04
`https://hub.docker.com/_/ubuntu/` Ubuntu 12.04 ~ 20.04
### 使
## 使
Ubuntu
```bash
$ docker run --name some-ubuntu -it ubuntu:18.04
$ docker run --name some-ubuntu -it ubuntu:20.04
root@523c70904d54:/#
```
### Dockerfile
## Dockerfile
https://github.com/docker-library/docs/tree/master/ubuntu 查看。

View File

@ -1,12 +1,12 @@
## [WordPress](https://hub.docker.com/_/wordpress/)
# [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`
@ -20,6 +20,6 @@ $ docker run --name some-wordpress --link some-mysql:mysql -d wordpress
* `WORDPRESS_DB_PASSWORD` mysql `MYSQL_ROOT_PASSWORD`
* `WORDPRESS_DB_NAME` `wordpress`
### Dockerfile
## Dockerfile
https://github.com/docker-library/docs/tree/master/wordpress 查看。

View File

@ -3,10 +3,11 @@
##
* Docker https://www.docker.com
* Docker https://blog.docker.com/
* Docker https://www.docker.com/blog/
* Docker https://docs.docker.com/
* Docker Hubhttps://hub.docker.com
* Docker https://github.com/moby/moby
* Docker 线 https://github.com/docker/roadmap/projects
* Docker https://docs.docker.com/release-notes/
* Docker https://docs.docker.com/engine/faq/
* Docker APIhttps://docs.docker.com/develop/sdk/

7
archive/README.md Normal file
View File

@ -0,0 +1,7 @@
#
* [Docker Machine](https://github.com/yeasy/docker_practice/tree/ca29ab51b121f43563f5d6659dedbda5cb6f048d/machine)
* [Docker Swarm](https://github.com/yeasy/docker_practice/tree/ca29ab51b121f43563f5d6659dedbda5cb6f048d/swarm)
* Mesos

View File

@ -1,7 +1,8 @@
#
Docker
* `Image`
* `Container`
* `Repository`
Docker
**Docker**
* ****`Image`
* ****`Container`
* ****`Repository`
**Docker**

View File

@ -1,13 +1,13 @@
## Docker
# Docker
`Image``Container` `` `实例`
宿 [](https://en.wikipedia.org/wiki/Linux_namespaces)。因此容器可以拥有自己的 `root` 文件系统、自己的网络配置、自己的进程空间,甚至自己的用户 ID 空间。容器内的进程是运行在一个隔离的环境里,使用起来,就好像是在一个独立于宿主的系统下操作一样。这种特性使得容器封装的应用比直接在宿主运行更加安全。也因为这种隔离的特性,很多人初学 Docker 时常常会混淆容器和虚拟机。
使****
使 ****
Docker 使 [Volume](../data_management/volume.md)宿宿
Docker 使 [Volume](../data_management/volume.md) [宿](../data_management/bind-mounts.md)宿
使

View File

@ -1,12 +1,12 @@
## Docker
# Docker
Linux `root` Docker Image `root` `ubuntu:18.04` Ubuntu 18.04 `root`
**** **** `Linux` `root` **Docker **`Image` `root` `ubuntu:18.04` Ubuntu 18.04 `root`
Docker
**Docker ** ****
###
##
`root` Docker [Union FS](https://en.wikipedia.org/wiki/Union_mount) 的技术,将其设计为分层存储的架构。所以严格来说,镜像并非是像一个 ISO 那样的打包文件,镜像只是一个虚拟的概念,其实际体现并非由一个文件组成,而是由一组文件系统组成,或者说,由多层文件系统联合组成。
`root` Docker [Union FS](https://en.wikipedia.org/wiki/Union_mount) 的技术,将其设计为分层存储的架构。所以严格来说,镜像并非是像一个 `ISO` 那样的打包文件,镜像只是一个虚拟的概念,其实际体现并非由一个文件组成,而是由一组文件系统组成,或者说,由多层文件系统联合组成。
西西

View File

@ -1,29 +1,29 @@
## Docker Registry
# Docker Registry
宿使[Docker Registry](../repository/registry.md)
**Docker Registry** ****`Repository`****`Tag`
**Docker Registry** ****`Repository` ****`Tag`
`<仓库名>:<标签>` `latest`
[Ubuntu ](https://hub.docker.com/_/ubuntu) 为例,`ubuntu` 是仓库的名字,其内包含有不同的版本标签,如,`16.04`, `18.04`。我们可以通过 `ubuntu:14.04`,或者 `ubuntu:18.04` 来具体指定所需哪个版本的镜像。如果忽略了标签,比如 `ubuntu`,那将视为 `ubuntu:latest`。
[Ubuntu ](https://hub.docker.com/_/ubuntu) 为例,`ubuntu` 是仓库的名字,其内包含有不同的版本标签,如,`16.04`, `18.04`。我们可以通过 `ubuntu:16.04`,或者 `ubuntu:18.04` 来具体指定所需哪个版本的镜像。如果忽略了标签,比如 `ubuntu`,那将视为 `ubuntu:latest`。
** `jwilder/nginx-proxy` Docker Registry 使 Docker Registry
### Docker Registry
## Docker Registry
Docker Registry 使 Registry
使 Registry [Docker Hub](https://hub.docker.com/),这也是默认的 Registry并拥有大量的高质量的官方镜像。除此以外,还有 [CoreOS](https://coreos.com/) 的 [Quay.io](https://quay.io/repository/)CoreOS 相关的镜像存储在这里Google 的 [Google Container Registry](https://cloud.google.com/container-registry/)[Kubernetes](http://kubernetes.io/) 的镜像使用的就是这个服务。
使 Registry [Docker Hub](https://hub.docker.com/),这也是默认的 Registry并拥有大量的高质量的 [官方镜像](https://hub.docker.com/search?q=&type=image&image_filter=official)。除此以外,还有 Red Hat 的 [Quay.io](https://quay.io/repository/)Google 的 [Google Container Registry](https://cloud.google.com/container-registry/)[Kubernetes](https://kubernetes.io/) 的镜像使用的就是这个服务;代码托管平台 [GitHub](https://github.com) 推出的 [ghcr.io](https://docs.github.com/cn/packages/working-with-a-github-packages-registry/working-with-the-container-registry)
访 Docker Hub `Registry Mirror`**** [](https://cr.console.aliyun.com/#/accelerator)、[DaoCloud 加速器](https://www.daocloud.io/mirror#accelerator-doc) 等。使用加速器会直接从国内的地址下载 Docker Hub 的镜像,比直接从 Docker Hub 下载速度会提高很多。在 [安装 Docker](../install/mirror.md) 一节中有详细的配置方法。
访 Docker Hub `Registry Mirror` **** [](https://www.aliyun.com/product/acr?source=5176.11533457&userCode=8lx5zmtu)、[DaoCloud 加速器](https://www.daocloud.io/mirror#accelerator-doc) 等。使用加速器会直接从国内的地址下载 Docker Hub 的镜像,比直接从 Docker Hub 下载速度会提高很多。在 [安装 Docker](../install/mirror.md) 一节中有详细的配置方法。
Docker Hub [](https://hub.tenxcloud.com/)、[网易云镜像服务](https://c.163.com/hub#/m/library/)、[DaoCloud 镜像市场](https://hub.daocloud.io/)、[阿里云镜像库](https://cr.console.aliyun.com) 等。
Docker Hub [](https://c.163.com/hub#/m/library/)、[DaoCloud 镜像市场](https://hub.daocloud.io/)、[阿里云镜像库](https://www.aliyun.com/product/acr?source=5176.11533457&userCode=8lx5zmtu) 等。
### Docker Registry
## Docker Registry
使 Docker RegistryDocker [Docker Registry](https://hub.docker.com/_/registry/) 镜像,可以直接使用做为私有 Registry 服务。在 [私有仓库](../repository/registry.md) 一节中,会有进一步的搭建私有 Registry 服务的讲解。
Docker Registry [Docker Registry API](https://docs.docker.com/registry/spec/api/) 的服务端实现,足以支持 `docker` 命令,不影响使用。但不包含图形界面,以及镜像维护、用户管理、访问控制等高级功能。在官方的商业化版本 [Docker Trusted Registry](https://docs.docker.com/datacenter/dtr/2.0/) 中,提供了这些高级功能。
Docker Registry [Docker Registry API](https://docs.docker.com/registry/spec/api/) 的服务端实现,足以支持 `docker` 命令,不影响使用。但不包含图形界面,以及镜像维护、用户管理、访问控制等高级功能。
Docker Registry Docker Registry API[VMWare Harbor](https://github.com/vmware/harbor) 和 [Sonatype Nexus](https://www.sonatype.com/docker)。
Docker Registry Docker Registry API[Harbor](https://github.com/goharbor/harbor) 和 [Sonatype Nexus](../repository/nexus3_registry.md)。

View File

@ -11,7 +11,7 @@
"-livereload",
"image-captions",
"github",
"page-treeview",
"page-treeview@2.9.8",
"editlink"
],
"pluginsConfig": {

5
buildx/README.md Normal file
View File

@ -0,0 +1,5 @@
# Docker Buildx
Docker Buildx docker CLI docker [Moby BuildKit](buildkit.md) docker build
> Docker v19.03+

154
buildx/buildkit.md Normal file
View File

@ -0,0 +1,154 @@
# 使 `BuildKit`
**BuildKit** https://github.com/moby/buildkit 开源。
**使 Docker 18.09BuildKit 使使 BuildKit 使 Dockerfile Dockerfile.buildkit**
Docker Hub buildkit https://github.com/docker-practice/docker-hub-buildx
## `Dockerfile`
`BuildKit` 使 `Dockerfile`
### `RUN --mount=type=cache`
使 `Go` `go mod``Node.js` `npm`
`npm`
```docker
FROM node:alpine as builder
WORKDIR /app
COPY package.json /app/
RUN npm i --registry=https://registry.npm.taobao.org \
&& rm -rf ~/.npm
COPY src /app/src
RUN npm run build
FROM nginx:alpine
COPY --from=builder /app/dist /app/dist
```
使 `dist` `package.json` `RUN npm i && rm -rf ~/.npm`
**** `node_modules` `node_modules` `node_modules`
`BuildKit` `RUN --mount=type=cache`
```docker
# syntax = docker/dockerfile:experimental
FROM node:alpine as builder
WORKDIR /app
COPY package.json /app/
RUN --mount=type=cache,target=/app/node_modules,id=my_app_npm_module,sharing=locked \
--mount=type=cache,target=/root/.npm,id=npm_cache \
npm i --registry=https://registry.npm.taobao.org
COPY src /app/src
RUN --mount=type=cache,target=/app/node_modules,id=my_app_npm_module,sharing=locked \
# --mount=type=cache,target=/app/dist,id=my_app_dist,sharing=locked \
npm run build
FROM nginx:alpine
# COPY --from=builder /app/dist /app/dist
# from source 使 RUN
RUN --mount=type=cache,target=/tmp/dist,from=builder,source=/app/dist \
# --mount=type=cache,target/tmp/dist,from=my_app_dist,sharing=locked \
mkdir -p /app/dist && cp -r /tmp/dist/* /app/dist
```
** `BuildKit` `Dockerfile` **
```docker
# syntax = docker/dockerfile:experimental
```
`RUN` `id` `my_app_npm_module` `/app/node_modules`
`RUN` `node_modules` `node_modules`
`RUN` `from` `builder` `source`
`Dockerfile` `--mount=type=cache,...`
|Option |Description|
|---------------------|-----------|
|`id` | `id` 便|
|`target` () | |
|`ro`,`readonly` | |
|`sharing` | `shared` `private` `locked` `sharing` 使 `BuildKit` 使 `id``shared` `private` 使使`locked` 使|
|`from` | |
|`source` | |
### `RUN --mount=type=bind`
```docker
# syntax = docker/dockerfile:experimental
RUN --mount=type=bind,from=php:alpine,source=/usr/local/bin/docker-php-entrypoint,target=/docker-php-entrypoint \
cat /docker-php-entrypoint
```
### `RUN --mount=type=tmpfs`
`tmpfs`
```docker
# syntax = docker/dockerfile:experimental
RUN --mount=type=tmpfs,target=/temp \
mount | grep /temp
```
### `RUN --mount=type=secret`
()
```docker
# syntax = docker/dockerfile:experimental
RUN --mount=type=secret,id=aws,target=/root/.aws/credentials \
cat /root/.aws/credentials
```
```bash
$ docker build -t test --secret id=aws,src=$HOME/.aws/credentials .
```
### `RUN --mount=type=ssh`
`ssh`
```docker
# syntax = docker/dockerfile:experimental
FROM alpine
RUN apk add --no-cache openssh-client
RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
RUN --mount=type=ssh ssh git@gitlab.com | tee /hello
```
```bash
$ eval $(ssh-agent)
$ ssh-add ~/.ssh/id_rsa
(Input your passphrase here)
$ docker build -t test --ssh default=$SSH_AUTH_SOCK .
```
## docker-compose build 使 Buildkit
`COMPOSE_DOCKER_CLI_BUILD=1` 使
##
* https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/experimental.md

17
buildx/buildx.md Normal file
View File

@ -0,0 +1,17 @@
# 使 Buildx
## 使
使 `docker buildx build`
```bash
$ docker buildx build .
[+] Building 8.4s (23/32)
=> ...
```
Buildx 使 [BuildKit ](buildkit.md) [Buildkit](buildkit.md)
##
* https://docs.docker.com/engine/reference/commandline/buildx/

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

@ -0,0 +1,126 @@
# 使 buildx Docker
Docker 使使 [`$ docker manifest`](../image/manifest.md)
Docker 19.03+ 使 `$ docker buildx build` 使 `BuildKit` `--platform` Docker
## `builder`
Docker for Linux `arm` Docker
```bash
$ docker run --rm --privileged tonistiigi/binfmt:latest --install all
```
Docker `builder` `--platform` `builder` 使 [](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md) 的 [`dockerpracticesig/buildkit:master`](https://github.com/docker-practice/buildx) 镜像替换官方镜像。
> https://github.com/docker-practice/buildx 构建自己的 buildkit 镜像并使用它。
```bash
#
$ docker buildx create --use --name=mybuilder-cn --driver docker-container --driver-opt image=dockerpracticesig/buildkit:master
# (coding.net )
$ docker buildx create --use --name=mybuilder-cn --driver docker-container --driver-opt image=dockerpracticesig/buildkit:master-tencent
# $ docker buildx create --name mybuilder --driver docker-container
$ docker buildx use mybuilder
```
##
Dockerfile
```docker
FROM --platform=$TARGETPLATFORM alpine
RUN uname -a > /os.txt
CMD cat /os.txt
```
使 `$ docker buildx build` `myusername` Docker Hub
`--push` Docker
```bash
$ docker buildx build --platform linux/arm,linux/arm64,linux/amd64 -t myusername/hello . --push
#
$ docker buildx imagetools inspect myusername/hello
```
```bash
# arm
$ docker run -it --rm myusername/hello
Linux buildkitsandbox 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 armv7l Linux
# arm64
$ docker run -it --rm myusername/hello
Linux buildkitsandbox 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 aarch64 Linux
# amd64
$ docker run -it --rm myusername/hello
Linux buildkitsandbox 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 x86_64 Linux
```
##
`Dockerfile`
**TARGETPLATFORM**
`linux/amd64`, `linux/arm/v7`, `windows/amd64`
**TARGETOS**
`TARGETPLATFORM` OS `linux`, `windows`
**TARGETARCH**
`TARGETPLATFORM` `amd64`, `arm`
**TARGETVARIANT**
`TARGETPLATFORM` `v7`
**BUILDPLATFORM**
`linux/amd64`
**BUILDOS**
`BUILDPLATFORM` OS `linux`
**BUILDARCH**
`BUILDPLATFORM` `amd64`
**BUILDVARIANT**
`BUILDPLATFORM` `v7`
### 使
`linux/arm/v7` `linux/amd64`
* `bin/dist-linux-arm`
* `bin/dist-linux-amd64`
`Dockerfile`
```docker
FROM scratch
# 使
ARG TARGETOS
ARG TARGETARCH
COPY bin/dist-${TARGETOS}-${TARGETARCH} /dist
ENTRYPOINT ["dist"]
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

View File

@ -1,7 +1,7 @@
# CI/CD
(Continuous integration)
**(Continuous integration)**
continuous deployment
**(continuous deployment)**
`Jenkins` Docker CI/CD Docker
`Jenkins` Docker CI/CD Docker

View File

@ -0,0 +1,28 @@
# GitHub Actions
GitHub [Actions](https://github.com/features/actions) 是 GitHub 推出的一款 CI/CD 工具。
`job` `step` 使 Docker
```yaml
on: push
name: CI
jobs:
my-job:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 2
- name: run docker container
uses: docker://golang:alpine
with:
args: go version
```
##
* [Actions Docs](https://docs.github.com/en/actions)

View File

@ -1,17 +0,0 @@
workspace:
base: /srv/drone-demo
path: .
pipeline:
build:
image: golang:alpine
# pull: true
environment:
- KEY=VALUE
secrets: [key1, key2]
commands:
# - echo $$KEY
- pwd
- ls
- CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
- ./app

View File

@ -1,35 +0,0 @@
version: '3'
services:
drone-server:
image: drone/drone:0.8-alpine
ports:
- 443:443
# - "${PRO_PUBLIC_IP}:8000:8000"
volumes:
- drone-data:/var/lib/drone/:rw
# - ${SSL_PATH}:/etc/certs
restart: always
environment:
- DRONE_SECRET=drone
- DRONE_OPEN=false
- DRONE_ADMIN=GITHUB_SERNAME
- DRONE_HOST=https://drone.yeasy.com
- DRONE_GITHUB=true
- DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT_PRO}
- DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET_PRO}
drone-agent:
image: drone/agent:0.8-alpine
restart: always
depends_on:
- drone-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock:rw
environment:
- DRONE_SECRET=drone
- DRONE_SERVER=drone-server:9000
dns: 114.114.114.114
volumes:
drone-data:

View File

@ -1,183 +0,0 @@
## Drone
`Docker` `CI/CD` `Drone` `Docker`
`.drone.yml` git `Drone`
`GitHub` + `Drone` `Drone` GitHub 使 `Gogs` + `Drone` `CI/CD`
###
* IP (使 Gogs + Drone)
* SSL ()
* `Docker` `Docker Compose`
* `Git`
* `CI/CD`
### GitHub
GitHub https://github.com/settings/applications/new 新建一个应用。
![](../.image/drone-github.png)
`Client ID` `Client Secret` Drone
### Drone
使 `Docker Compose` `Drone` `docker-compose.yml`
```yaml
version: '3'
services:
drone-server:
image: drone/drone:0.8-alpine
ports:
- 443:443
# - "${PRO_PUBLIC_IP}:8000:8000"
volumes:
- drone-data:/var/lib/drone/:rw
- ${SSL_PATH}:/etc/certs:rw
restart: always
environment:
- DRONE_SECRET=drone
- DRONE_OPEN=false
- DRONE_ADMIN=${GITHUB_SERNAME}
- DRONE_HOST=${DRONE_HOST}
- DRONE_GITHUB=true
- DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT}
- DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET}
- DRONE_SERVER_CERT=/etc/certs/drone.domain.com.crt
- DRONE_SERVER_KEY=/etc/certs/drone.domain.com.key
drone-agent:
image: drone/agent:0.8-alpine
restart: always
depends_on:
- drone-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock:rw
environment:
- DRONE_SECRET=drone
- DRONE_SERVER=drone-server:9000
dns: 114.114.114.114
volumes:
drone-data:
```
`${SSL_PATH}` SSL
`${GITHUB_SERNAME}` GitHub Drone
`${DRONE_HOST}` Drone
`${DRONE_GITHUB_CLIENT}` GitHub `Client ID`
`${DRONE_GITHUB_SECRET}` GitHub `Client Secret`
** `443` Nginx
#### Drone
```bash
$ docker-compose up -d
```
### Drone
Github `drone-demo`
Drone 使 GitHub `drone-demo`
###
git
```bash
$ mkdir drone-demo
$ cd drone-demo
$ git init
$ git remote add origin git@github.com:username/drone-demo.git
```
`Go` `Hello World!`
`app.go`
```go
package main
import "fmt"
func main(){
fmt.Printf("Hello World!");
}
```
`.drone.yml`
```yaml
workspace:
base: /srv/drone-demo
path: .
pipeline:
build:
image: golang:alpine
# pull: true
environment:
- KEY=VALUE
secrets: [key1, key2]
commands:
- echo $$KEY
- pwd
- ls
- CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
- ./app
```
`workspace` git git golang `/srv/drone-demo`
`pipeline` Docker
```bash
.
.drone.yml
app.go
```
### GitHub
```bash
$ git add .
$ git commit -m "test drone ci"
$ git push origin master
```
###
`Drone`
![](../.image/drone-build.png)
GitHubDocker Registry
GitBook 使 Drone CI/CD [`.drone.yml`](https://github.com/yeasy/docker_practice/blob/master/.drone.yml) 文件。
##
* [Drone Github](https://github.com/drone/drone)
* [Drone ](http://docs.drone.io/)

View File

@ -0,0 +1,6 @@
DRONE_SERVER_HOST=
DRONE_SERVER_PROTO=
DRONE_RPC_SECRET=
HOSTNAME=
DRONE_GITHUB_CLIENT_ID=
DRONE_GITHUB_CLIENT_SECRET=

2
cases/ci/drone/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.env
ssl/*

99
cases/ci/drone/README.md Normal file
View File

@ -0,0 +1,99 @@
# Drone
`Docker` `CI/CD` `Drone` `Docker`
`.drone.yml` git `Drone`
`GitHub` + `Drone` `Drone` GitHub 使 `Gogs` + `Drone` `CI/CD`
## Drone
Github `drone-demo`
[ Drone ](install.md) [Drone Cloud](https://cloud.drone.io),使用 GitHub 账号登录,在界面中关联刚刚新建的 `drone-demo` 仓库。
##
git
```bash
$ mkdir drone-demo
$ cd drone-demo
$ git init
$ git remote add origin git@github.com:username/drone-demo.git
```
`Go` `Hello World!`
`app.go`
```go
package main
import "fmt"
func main(){
fmt.Printf("Hello World!\n");
}
```
`.drone.yml`
```yaml
kind: pipeline
type: docker
name: build
steps:
- name: build
image: golang:alpine
pull: if-not-exists # always never
environment:
KEY: VALUE
commands:
- echo $KEY
- pwd
- ls
- CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
- ./app
trigger:
branch:
- master
```
```bash
.
.drone.yml
app.go
```
## GitHub
```bash
$ git add .
$ git commit -m "test drone ci"
$ git push origin master
```
##
`Drone` Drone Cloud
![](./_images/drone-build.png)
GitHubDocker Registry
GitBook 使 Drone CI/CD [`.drone.yml`](https://github.com/yeasy/docker_practice/blob/master/.drone.yml) 文件。
##
* [Drone Github](https://github.com/drone/drone)
* [Drone ](https://docs.drone.io/)
* [Drone ](https://github.com/docker-practice/drone-demo)

View File

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

@ -0,0 +1,19 @@
kind: pipeline
type: docker
name: build
steps:
- name: build
image: golang:alpine
pull: if-not-exists # always never
environment:
KEY: VALUE
commands:
- echo $KEY
- pwd
- ls
- CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
- ./app
trigger:
branch:
- master

View File

@ -0,0 +1 @@
# Drone Demo

View File

@ -3,5 +3,5 @@ package main
import "fmt"
func main(){
fmt.Printf("Hello World!");
fmt.Printf("Hello World!\n");
}

View File

@ -0,0 +1,38 @@
version: '3'
services:
drone-server:
image: drone/drone:2.3.1
ports:
- 443:443
- 80:80
volumes:
- drone-data:/data:rw
- ./ssl:/etc/certs
restart: always
environment:
- DRONE_SERVER_HOST=${DRONE_SERVER_HOST:-drone.domain.com}
- DRONE_SERVER_PROTO=${DRONE_SERVER_PROTO:-https}
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET:-secret}
- DRONE_GITHUB_SERVER=https://github.com
- DRONE_GITHUB_CLIENT_ID=${DRONE_GITHUB_CLIENT_ID}
- DRONE_GITHUB_CLIENT_SECRET=${DRONE_GITHUB_CLIENT_SECRET}
drone-agent:
image: drone/drone-runner-docker:1
restart: always
depends_on:
- drone-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock:rw
environment:
- DRONE_RPC_PROTO=http
- DRONE_RPC_HOST=drone-server
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET:-secret}
- DRONE_RUNNER_NAME=${HOSTNAME:-demo}
- DRONE_RUNNER_CAPACITY=2
dns: 114.114.114.114
volumes:
drone-data:

86
cases/ci/drone/install.md Normal file
View File

@ -0,0 +1,86 @@
# Drone
##
* IP (使 Gogs + Drone)
* SSL ()
* `Docker` `Docker Compose`
* `Git`
* `CI/CD`
## GitHub
GitHub https://github.com/settings/applications/new 新建一个应用。
![](https://docs.drone.io/screenshots/github_application_create.png)
`Client ID` `Client Secret` Drone
## Drone
使 `Docker Compose` `Drone` `docker-compose.yml`
```yaml
version: '3'
services:
drone-server:
image: drone/drone:2.3.1
ports:
- 443:443
- 80:80
volumes:
- drone-data:/data:rw
- ./ssl:/etc/certs
restart: always
environment:
- DRONE_SERVER_HOST=${DRONE_SERVER_HOST:-https://drone.yeasy.com}
- DRONE_SERVER_PROTO=${DRONE_SERVER_PROTO:-https}
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET:-secret}
- DRONE_GITHUB_SERVER=https://github.com
- DRONE_GITHUB_CLIENT_ID=${DRONE_GITHUB_CLIENT_ID}
- DRONE_GITHUB_CLIENT_SECRET=${DRONE_GITHUB_CLIENT_SECRET}
drone-agent:
image: drone/drone-runner-docker:1
restart: always
depends_on:
- drone-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock:rw
environment:
- DRONE_RPC_PROTO=http
- DRONE_RPC_HOST=drone-server
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET:-secret}
- DRONE_RUNNER_NAME=${HOSTNAME:-demo}
- DRONE_RUNNER_CAPACITY=2
dns: 114.114.114.114
volumes:
drone-data:
```
`.env`
```bash
# drone.domain.com
DRONE_SERVER_HOST=
DRONE_SERVER_PROTO=https
DRONE_RPC_SECRET=secret
HOSTNAME=demo
# GitHub
DRONE_GITHUB_CLIENT_ID=
# GitHub
DRONE_GITHUB_CLIENT_SECRET=
```
### Drone
```bash
$ docker-compose up -d
```

View File

@ -1,9 +1,9 @@
#
Linux Debian/Ubuntu CentOS/Fedora
Linux `Debian/Ubuntu` `CentOS/Fedora`
使 Docker Linux Linux
使 Docker 使 BusyboxAlphineDebian/UbuntuCentOS/Fedora
使 Docker 使 `Busybox``Alphine``Debian/Ubuntu``CentOS/Fedora`

View File

@ -1,14 +1,14 @@
## Alpine
# Alpine
###
##
![Apline Linux ](_images/alpinelinux-logo.png)
![Alpine Linux ](./_images/alpinelinux-logo.png)
`Alpine` `Linux` `Linux` `Alpine` `musl libc` `busybox` `busybox` `Alpine` `apk` `https://pkgs.alpinelinux.org/packages` `apk`
`Alpine` 广 `Linux`/`Linux``Alpine` /
`Alpine` Docker Alpine Linux `Docker` 5 MB Ubuntu 200 MB `docker-alpine`
`Alpine` Docker `Alpine Linux` `Docker` **5 MB** `Ubuntu` `200 MB` `docker-alpine`
Docker 使 `Alpine` `Ubuntu` 便
@ -22,7 +22,7 @@ ubuntu latest b39b81afc8ca 188.3 MB
centos latest 8efe422e6104 210 MB
```
### 使
## 使
使 `docker run` `Alpine` Linux
@ -31,17 +31,17 @@ $ docker run alpine echo '123'
123
```
### `Alpine`
## `Alpine`
Docker Alpine
Docker `Alpine`
* ubuntu/debian -> alpine
* python:2.7 -> python:2.7-alpine
* ruby:2.3 -> ruby:2.3-alpine
* `ubuntu/debian` -> `alpine`
* `python:3` -> `python:3-alpine`
* `ruby:2.6` -> `ruby:2.6-alpine`
使 `Alpine` `Ubuntu` apk apt
使 `Alpine` `Ubuntu` `apk` `apt`
```bash
$ apk add --no-cache <package>
@ -50,13 +50,20 @@ $ apk add --no-cache <package>
`Alpine` `https://pkgs.alpinelinux.org/packages` 使
```bash
$ echo "http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
$ echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
$ apk --update add --no-cache <package>
```
###
访 `apk` 使 `apk`
* `Alpine` http://alpinelinux.org/
```docker
RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories \
&& apk add --no-cache <package>
```
##
* `Alpine` https://www.alpinelinux.org/
* `Alpine` https://github.com/alpinelinux
* `Alpine` https://hub.docker.com/_/alpine/
* `Alpine` https://github.com/gliderlabs/docker-alpine

View File

@ -1,42 +1,27 @@
## Busybox
# Busybox
###
##
![Busybox - Linux ](_images/busybox-logo.png)
![Busybox - Linux ](./_images/busybox-logo.png)
BusyBox Linux catechogrepmounttelnet MB 便Linux
`BusyBox` Linux `cat``echo``grep``mount``telnet` MB 便Linux
BusyBox POSIX Linux AndroidHurdFreeBSD
`BusyBox` `POSIX` `Linux` `Android``Hurd``FreeBSD`
###
##
Docker Hub busybox
```bash
$ docker search busybox
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
busybox Busybox base image. 755 [OK]
progrium/busybox 63 [OK]
radial/busyboxplus Full-chain, Internet enabled, busybox made... 11 [OK]
odise/busybox-python 3 [OK]
multiarch/busybox multiarch ports of ubuntu-debootstrap 2 [OK]
azukiapp/busybox This image is meant to be used as the base... 2 [OK]
...
```
OFFICIAL 使 docker pull `busybox:latest`
使 `docker pull` `busybox:latest`
```bash
$ docker pull busybox:latest
busybox:latest: The image you are pulling has been verified
e433a6c5b276: Pull complete
e72ac664f4f0: Pull complete
511136ea3c5a: Pull complete
df7546f9f060: Pull complete
latest: Pulling from library/busybox
5c4213be9af9: Pull complete
Digest: sha256:c6b45a95f932202dbb27c31333c4789f45184a744060f6e569cc9d2bf1b9ad6f
Status: Downloaded newer image for busybox:latest
docker.io/library/busybox:latest
```
busybox 2.433 MB
`busybox` **2.433 MB**
```bash
$ docker image ls
@ -44,9 +29,9 @@ REPOSITORY TAG IMAGE ID CREATED
busybox latest e72ac664f4f0 6 weeks ago 2.433 MB
```
### busybox
## busybox
busybox grep
`busybox` `grep`
```bash
$ docker run -it busybox
@ -85,27 +70,44 @@ Search for PATTERN in FILEs (or stdin)
```bash
/ # mount
rootfs on / type rootfs (rw)
none on / type aufs (rw,relatime,si=b455817946f8505c)
overlay on / type overlay (rw,relatime,lowerdir=/var/lib/docker/overlay2/l/BOTCI5RF24AMC4A2UWF4N6ZWFP:/var/lib/docker/overlay2/l/TWVP5T5DMKJGXZOROR7CAPWGFP,upperdir=/var/lib/docker/overlay2/801ef0bf6cce35288dbb8fe00a4f9cc47760444693bfdf339ed0bdcf926e12a3/diff,workdir=/var/lib/docker/overlay2/801ef0bf6cce35288dbb8fe00a4f9cc47760444693bfdf339ed0bdcf926e12a3/work)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev type tmpfs (rw,nosuid,mode=755)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
tmpfs on /dev type tmpfs (rw,nosuid,size=65536k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666)
sysfs on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
/dev/disk/by-uuid/b1f2dba7-d91b-4165-a377-bf1a8bed3f61 on /etc/resolv.conf type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/disk/by-uuid/b1f2dba7-d91b-4165-a377-bf1a8bed3f61 on /etc/hostname type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/disk/by-uuid/b1f2dba7-d91b-4165-a377-bf1a8bed3f61 on /etc/hosts type ext4 (rw,relatime,errors=remount-ro,data=ordered)
devpts on /dev/console type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
proc on /proc/sys type proc (ro,nosuid,nodev,noexec,relatime)
proc on /proc/sysrq-trigger type proc (ro,nosuid,nodev,noexec,relatime)
proc on /proc/irq type proc (ro,nosuid,nodev,noexec,relatime)
proc on /proc/bus type proc (ro,nosuid,nodev,noexec,relatime)
tmpfs on /proc/kcore type tmpfs (rw,nosuid,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,relatime,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (ro,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (ro,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/freezer type cgroup (ro,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (ro,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup (ro,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/blkio type cgroup (ro,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (ro,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/memory type cgroup (ro,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (ro,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/pids type cgroup (ro,nosuid,nodev,noexec,relatime,pids)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
/dev/vda1 on /etc/resolv.conf type ext3 (rw,noatime,data=ordered)
/dev/vda1 on /etc/hostname type ext3 (rw,noatime,data=ordered)
/dev/vda1 on /etc/hosts type ext3 (rw,noatime,data=ordered)
devpts on /dev/console type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666)
proc on /proc/bus type proc (ro,relatime)
proc on /proc/fs type proc (ro,relatime)
proc on /proc/irq type proc (ro,relatime)
proc on /proc/sys type proc (ro,relatime)
proc on /proc/sysrq-trigger type proc (ro,relatime)
tmpfs on /proc/acpi type tmpfs (ro,relatime)
tmpfs on /proc/kcore type tmpfs (rw,nosuid,size=65536k,mode=755)
tmpfs on /proc/keys type tmpfs (rw,nosuid,size=65536k,mode=755)
tmpfs on /proc/timer_list type tmpfs (rw,nosuid,size=65536k,mode=755)
tmpfs on /proc/sched_debug type tmpfs (rw,nosuid,size=65536k,mode=755)
tmpfs on /sys/firmware type tmpfs (ro,relatime)
```
busybox Linux Linux
`busybox` `Linux` `Linux`
###
##
* `Busybox` https://busybox.net/
* `Busybox` https://git.busybox.net/busybox/

View File

@ -1,57 +1,37 @@
## CentOS/Fedora
# CentOS/Fedora
### CentOS
## CentOS
CentOS Fedora Redhat Linux CentOS Fedora
`CentOS` `Fedora` `Redhat` Linux `CentOS` `Fedora`
![CentOS ](_images/centos-logo.png)
![CentOS ](./_images/centos-logo.png)
CentOSCommunity Enterprise Operating System Red Hat Enterprise Linux CentOS Redhat Linux 使 CentOS Red Hat Enterprise LinuxCentOS
CentOSCommunity Enterprise Operating System `Red Hat Enterprise Linux` `CentOS` `Redhat Linux` 使 `CentOS` `Red Hat Enterprise Linux``CentOS`
#### 使 CentOS
### 使 CentOS
使 `docker search` 25 CentOS
使 `docker run` `CentOS 7` `bash`
```bash
$ docker search -f stars=25 centos
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
centos The official... 2543 [OK]
jdeathe/centos-ssh 27 [OK]
```
使 docker run CentOS bash
```bash
$ docker run -it centos bash
$ docker run -it centos:7 bash
Unable to find image 'centos:latest' locally
latest: Pulling from library/centos
3d8673bd162a: Pull complete
Digest: sha256:a66ffcb73930584413de83311ca11a4cb4938c9b2521d331026dad970c19adf4
Status: Downloaded newer image for centos:latest
[root@43eb3b194d48 /]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
CentOS Linux release 7.9.2009 (Core)
```
### Fedora
## Fedora
![Fedora ](_images/fedora-logo.png)
![Fedora ](./_images/fedora-logo.png)
Fedora Fedora Project Linux Fedora Red Hat Red Hat Enterprise Linux
`Fedora` `Fedora Project` `Linux` `Fedora` `Red Hat` `Red Hat Enterprise Linux`
#### 使 Fedora
### 使 Fedora
使 `docker search` 2 Fedora
```bash
$ docker search -f stars=2 fedora
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
fedora Official Docker builds of Fedora 433 [OK]
dockingbay/fedora-rust Trusted build of Rust programming language... 3 [OK]
gluster/gluster-fedora Official GlusterFS image [ Fedora 21 + Glu... 3 [OK]
startx/fedora Simple container used for all startx based... 2 [OK]
```
使 docker run Fedora bash
使 `docker run` `Fedora` `bash`
```bash
$ docker run -it fedora bash
@ -64,7 +44,7 @@ Status: Downloaded newer image for fedora:latest
Fedora release 24 (Twenty Four)
```
###
##
* `Fedora` https://getfedora.org/
* `Fedora` https://github.com/fedora-infra

View File

@ -1,32 +1,20 @@
## Debian/Ubuntu
Debian Ubuntu Debian Docker Hub
# Debian/Ubuntu
### Debian
`Debian` `Ubuntu` **Debian ** `Docker Hub`
![Debian ](_images/debian-logo.png)
## Debian
Debian GPL Debian Debian ProjectDebian 3000 Software in the Public Interest Debian Unix Debian 25,000 12
![Debian ](./_images/debian-logo.png)
Debian Linux Debian GNU/Linux GNU Hurd Debian GNU/Hurd FreeBSD Debian GNU/kFreeBSD NetBSD Debian GNU/NetBSD Debian OpenSolaris Nexenta OS Debian Linux Debian GNU/Linux
`Debian` `GPL` **Debian Debian Project** **Debian ** `3000` `Software in the Public Interest` `Debian` `Unix` `Debian` `25,000` `12`
Linux UbuntuKnoppix Linspire Xandros Debian GNU/Linux
`Debian` `Linux` `Debian GNU/Linux` `GNU Hurd` `Debian GNU/Hurd` `FreeBSD` `Debian GNU/kFreeBSD` `NetBSD` `Debian GNU/NetBSD` `Debian` `OpenSolaris` `Nexenta OS` `Debian` `Linux` `Debian GNU/Linux`
#### 使 Debian
`Linux` `Ubuntu``Knoppix` `Linspire` `Xandros` `Debian GNU/Linux`
使 docker search Docker Hub Debian
### 使 Debian
```bash
$ docker search debian
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
debian Debian is... 1565 [OK]
neurodebian NeuroDebian... 26 [OK]
armbuild/debian port of debian 8 [OK]
...
```
debian neurodebian
使 docker run Debian
`debian` `neurodebian` 使 `docker run` `Debian`
```bash
$ docker run -it debian bash
@ -34,39 +22,19 @@ root@668e178d8d69:/# cat /etc/issue
Debian GNU/Linux 8
```
Debian
`Debian`
### Ubuntu
## Ubuntu
![Ubuntu ](_images/ubuntu-logo.jpg)
![Ubuntu ](./_images/ubuntu-logo.jpg)
Ubuntu GNU/LinuxubuntuUbuntu Ubuntu Debian GNOME/Unity Debian 6 2 Long Term SupportLTS 3
`Ubuntu` `GNU/Linux` ubuntu`Ubuntu` `Ubuntu` `Debian` `GNOME/Unity` `Debian` 6 2 **Long Term SupportLTS** 3
#### 使 Ubuntu
### 使 Ubuntu
Ubuntu 使 `--filter=stars=10` 10
`ubuntu:18.04` 使
```bash
$ docker search --filter=stars=10 ubuntu
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
ubuntu Official Ubuntu base image 840 [OK]
dockerfile/ubuntu Trusted automated Ubuntu (http://www.ubunt... 30 [OK]
crashsystems/gitlab-docker A trusted, regularly updated build of GitL... 20 [OK]
sylvainlasnier/memcached This is a Memcached 1.4.14 docker images b... 16 [OK]
ubuntu-upstart Upstart is an event-based replacement for ... 16 [OK]
mbentley/ubuntu-django-uwsgi-nginx 16 [OK]
ansible/ubuntu14.04-ansible Ubuntu 14.04 LTS with ansible 15 [OK]
clue/ttrss The Tiny Tiny RSS feed reader allows you t... 14 [OK]
dockerfile/ubuntu-desktop Trusted automated Ubuntu Desktop (LXDE) (h... 14 [OK]
tutum/ubuntu Ubuntu image with SSH access. For the root... 12 [OK]
```
使
ubuntu 18.04 使
使 `-ti` bash ubuntu
使 `-ti` `bash` `ubuntu`
```bash
$ docker run -ti ubuntu:18.04 /bin/bash
@ -95,51 +63,60 @@ Reading state information... Done
E: Unable to locate package curl
```
`apt-get` Docker apt `apt-get update` apt-get
`apt-get` Docker `apt` `apt-get update` `apt-get`
```bash
root@7d93de07bf76:/# apt-get update
Ign http://archive.ubuntu.com trusty InRelease
Ign http://archive.ubuntu.com trusty-updates InRelease
Ign http://archive.ubuntu.com trusty-security InRelease
Ign http://archive.ubuntu.com trusty-proposed InRelease
Get:1 http://archive.ubuntu.com trusty Release.gpg [933 B]
...
Get:1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:3 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [7348 B]
Get:4 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [823 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [31.0 kB]
Get:9 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [835 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1127 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1350 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [11.4 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [44.7 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [2496 B]
Get:18 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [4252 B]
Fetched 17.6 MB in 1min 25s (207 kB/s)
Reading package lists... Done
```
curl
`curl`
```bash
root@7d93de07bf76:/# apt-get install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
ca-certificates krb5-locales libasn1-8-heimdal libcurl3 libgssapi-krb5-2
libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal
libheimntlm0-heimdal libhx509-5-heimdal libidn11 libk5crypto3 libkeyutils1
libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2
libroken18-heimdal librtmp0 libsasl2-2 libsasl2-modules libsasl2-modules-db
libwind0-heimdal openssl
The following additional packages will be installed:
ca-certificates krb5-locales libasn1-8-heimdal libcurl4 libgssapi-krb5-2 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal
libk5crypto3 libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common libnghttp2-14 libpsl5 libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libsqlite3-0 libssl1.1 libwind0-heimdal openssl publicsuffix
...
root@7d93de07bf76:/# curl
curl: try 'curl --help' or 'curl --manual' for more information
```
apache
`apache`
```bash
root@7d93de07bf76:/# apt-get install -y apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
apache2-bin apache2-data libapr1 libaprutil1 libaprutil1-dbd-sqlite3
libaprutil1-ldap libxml2 sgml-base ssl-cert xml-core
The following additional packages will be installed:
apache2-bin apache2-data apache2-utils file libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libexpat1 libgdbm-compat4 libgdbm5 libicu60 liblua5.2-0 libmagic-mgc libmagic1 libperl5.26 libxml2 mime-support netbase perl perl-modules-5.26 ssl-cert xz-utils
...
```
apache 使 curl 访
`apache` 使 `curl` 访
```bash
root@7d93de07bf76:/# service apache2 start
@ -151,7 +128,7 @@ root@7d93de07bf76:/# curl 127.0.0.1
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
Modified from the Debian original for Ubuntu
Last updated: 2014-03-19
Last updated: 2016-11-16
See: https://launchpad.net/bugs/1288690
-->
<head>
@ -163,14 +140,14 @@ root@7d93de07bf76:/# curl 127.0.0.1
使 `-p` 访
###
##
* `Debian` https://www.debian.org/
* `Neuro Debian` http://neuro.debian.net/
* `Debian` https://github.com/Debian
* `Debian` https://hub.docker.com/_/debian/
* `Debian` https://github.com/tianon/docker-brew-debian/
* `Ubuntu` http://www.ubuntu.org.cn/global
* `Ubuntu` https://ubuntu.com
* `Ubuntu` https://github.com/ubuntu
* `Ubuntu` https://hub.docker.com/_/ubuntu/
* `Ubuntu` https://github.com/tianon/docker-brew-ubuntu-core

View File

@ -2,10 +2,10 @@
使
Docker Hub Docker
`Docker Hub` Docker
*
*
* SSH

View File

@ -2,4 +2,4 @@
Docker
AWSGoogleAzureDocker
AWSGoogleAzure Kubernetes [](https://cloud.tencent.com/act/cps/redirect?redirect=11588&cps_key=3a5255852d5db99dcd5da4c72f05df61) 让用户在云上享有安全高效的镜像托管、分发等服务。

View File

@ -1,11 +1,11 @@
##
#
![](_images/aliyun-logo.png)
![](./_images/aliyun-logo.png)
2009
[](https://www.aliyun.com?source=5176.11533457&userCode=8lx5zmtu&type=copy) 创立于 2009 年,是中国较早的云计算平台。阿里云致力于提供安全、可靠的计算和数据处理能力。
11
[](https://www.aliyun.com?source=5176.11533457&userCode=8lx5zmtu&type=copy) 的客户群体中,活跃着微博、虎牙、魅族、优酷等一大批明星互联网公司。在天猫双 11 全球狂欢节等极富挑战的应用场景中,阿里云保持着良好的运行纪录。
Docker 线
[ Kubernetes ACK](https://www.aliyun.com/product/kubernetes?source=5176.11533457&userCode=8lx5zmtu&type=copy) 提供了高性能、可伸缩的容器应用管理服务,支持在一组云服务器上通过 Docker 容器来进行应用生命周期管理。容器服务极大简化了用户对容器管理集群的搭建工作,无缝整合了阿里云虚拟化、存储、网络和安全能力。容器服务提供了多种应用发布方式和流水线般的持续交付能力,原生支持微服务架构,助力用户无缝上云和跨云管理。
![](https://img.alicdn.com/tps/TB10yjtPpXXXXacXXXXXXXXXXXX-1531-1140.png)

View File

@ -1,13 +1,11 @@
##
#
![AWS](_images/aws-logo.jpg)
![AWS](./_images/aws-logo.jpg)
AWS Amazon Web ServicesAmazon IaaS PaaS AWS 使AWS IT
[AWS](https://www.amazonaws.cn),即 Amazon Web Services是亚马逊Amazon公司的 IaaS 和 PaaS 平台服务。AWS 提供了一整套基础设施和应用程序服务使用户几乎能够在云中运行一切应用程序从企业应用程序和大数据项目到社交游戏和移动应用程序。AWS 面向用户提供包括弹性计算、存储、数据库、应用程序在内的一整套云计算服务,能够帮助企业降低 IT 投入成本和维护成本。
2006 AWS AWS Internet 便使 AWS
2015 AWS EC2 (ECS)ECS Docker ECS Docker SwarmKubernetesMesos ECS ECS
![AWS ](_images/ECS.jpg)
![AWS ](./_images/ECS.jpg)

View File

@ -1,7 +1,7 @@
##
#
IaaS
Container as a ServiceCaaS
Container as a ServiceCaaS

View File

@ -1,11 +0,0 @@
##
![](_images/qcloud-logo.jpg)
web MTA QQQQ 使
使API便Docker使
![](https://mc.qcloudimg.com/static/img/0581dbeb97c869bbe6e62025dbc592d7/image.png)

View File

@ -1,4 +1,5 @@
##
#
Docker
Docker

11
cloud/tencentCloud.md Normal file
View File

@ -0,0 +1,11 @@
#
![](./_images/qcloud-logo.jpg)
[](https://cloud.tencent.com/act/cps/redirect?redirect=1040&cps_key=3a5255852d5db99dcd5da4c72f05df61&from=console) 在架构方面经过多年积累,并且有着多年对海量互联网服务的经验。不管是社交、游戏还是其他领域,都有多年的成熟产品来提供产品服务。腾讯在云端完成重要部署,为开发者及企业提供云服务、云数据、云运营等整体一站式服务方案。
[](https://cloud.tencent.com/act/cps/redirect?redirect=1001&cps_key=3a5255852d5db99dcd5da4c72f05df61&from=console)、[云存储](https://cloud.tencent.com/act/cps/redirect?redirect=1020&cps_key=3a5255852d5db99dcd5da4c72f05df61&from=console)、[云数据库](https://cloud.tencent.com/act/cps/redirect?redirect=1003&cps_key=3a5255852d5db99dcd5da4c72f05df61&from=console)、[视频与CDN](https://cloud.tencent.com/act/cps/redirect?redirect=1019&cps_key=3a5255852d5db99dcd5da4c72f05df61&from=console) 和 [域名注册](https://dnspod.cloud.tencent.com) 等基础云服务腾讯云分析MTA、腾讯云推送信鸽等腾讯整体大数据能力以及 QQ互联、QQ 空间、微云、微社区等云端链接社交体系。这些正是腾讯云可以提供给这个行业的差异化优势,造就了可支持各种互联网使用场景的高品质的腾讯云技术平台。
[ TKE](https://cloud.tencent.com/act/cps/redirect?redirect=10058&cps_key=3a5255852d5db99dcd5da4c72f05df61) 是高度可扩展的高性能容器管理服务,用户可以在托管的云服务器实例集群上轻松运行应用程序。使用该服务,将无需安装、运维、扩展用户的集群管理基础设施,只需进行简单的 API 调用,便可启动和停止 Docker 应用程序,查询集群的完整状态,以及使用各种云服务。用户可以根据用户的资源需求和可用性要求在用户的集群中安排容器的置放,满足业务或应用程序的特定要求。
![](https://mc.qcloudimg.com/static/img/0581dbeb97c869bbe6e62025dbc592d7/image.png)

View File

@ -1,6 +1,7 @@
## Compose
# Compose
##
###
Compose
`docker-compose [COMMAND] --help` `docker-compose help [COMMAND]` 使
@ -11,23 +12,19 @@
docker-compose [-f=<arg>...] [options] [COMMAND] [ARGS...]
```
###
##
* `-f, --file FILE` 使 Compose `docker-compose.yml`
* `-p, --project-name NAME` 使
* `--x-networking` 使 Docker
* `--x-network-driver DRIVER` `bridge`
* `--verbose`
* `-v, --version` 退
### 使
## 使
#### `build`
### `build`
`docker-compose build [options] [SERVICE...]`
@ -45,27 +42,28 @@ docker-compose [-f=<arg>...] [options] [COMMAND] [ARGS...]
* `--pull` pull
#### `config`
### `config`
Compose
#### `down`
### `down`
`up`
#### `exec`
### `exec`
#### `help`
### `help`
#### `images`
### `images`
Compose
#### `kill`
### `kill`
`docker-compose kill [options] [SERVICE...]`
`SIGKILL`
@ -76,19 +74,22 @@ docker-compose [-f=<arg>...] [options] [COMMAND] [ARGS...]
$ docker-compose kill -s SIGINT
```
#### `logs`
### `logs`
`docker-compose logs [options] [SERVICE...]`
docker-compose 使 `--no-color`
#### `pause`
### `pause`
`docker-compose pause [SERVICE...]`
#### `port`
### `port`
`docker-compose port [options] SERVICE PRIVATE_PORT`
@ -99,7 +100,8 @@ $ docker-compose kill -s SIGINT
* `--index=index` 1
#### `ps`
### `ps`
`docker-compose ps [options] [SERVICE...]`
@ -108,7 +110,8 @@ $ docker-compose kill -s SIGINT
* `-q` ID
#### `pull`
### `pull`
`docker-compose pull [options] [SERVICE...]`
@ -117,11 +120,12 @@ $ docker-compose kill -s SIGINT
* `--ignore-pull-failures`
#### `push`
### `push`
Docker
#### `restart`
### `restart`
`docker-compose restart [options] [SERVICE...]`
@ -130,7 +134,8 @@ $ docker-compose kill -s SIGINT
* `-t, --timeout TIMEOUT` 10
#### `rm`
### `rm`
`docker-compose rm [options] [SERVICE...]`
`docker-compose stop`
@ -141,7 +146,7 @@ $ docker-compose kill -s SIGINT
* `-v`
#### `run`
### `run`
`docker-compose run [options] [-p PORT...] [-e KEY=VAL...] SERVICE [COMMAND] [ARGS...]`
@ -194,7 +199,8 @@ $ docker-compose run --no-deps web python manage.py shell
* `-T` tty tty
#### `scale`
### `scale`
`docker-compose scale [options] [SERVICE=NUM...]`
@ -213,12 +219,14 @@ $ docker-compose scale web=3 db=2
* `-t, --timeout TIMEOUT` 10
#### `start`
### `start`
`docker-compose start [SERVICE...]`
#### `stop`
### `stop`
`docker-compose stop [options] [SERVICE...]`
`docker-compose start`
@ -227,16 +235,18 @@ $ docker-compose scale web=3 db=2
* `-t, --timeout TIMEOUT` 10
#### `top`
### `top`
#### `unpause`
### `unpause`
`docker-compose unpause [SERVICE...]`
#### `up`
### `up`
`docker-compose up [options] [SERVICE...]`
@ -269,7 +279,12 @@ $ docker-compose scale web=3 db=2
* `-t, --timeout TIMEOUT` 10
#### `version`
### `version`
`docker-compose version`
##
* [](https://docs.docker.com/compose/reference/overview/)

View File

@ -1,4 +1,4 @@
## Compose
# Compose
使 `Compose` `docker run`
@ -18,11 +18,11 @@ services:
`image` `build` Dockerfile
使 `build` `Dockerfile` (`CMD`, `EXPOSE`, `VOLUME`, `ENV` ) `docker-compose.yml`
使 `build` `Dockerfile` (`CMD`, `EXPOSE`, `VOLUME`, `ENV` ) `docker-compose.yml`
### `build`
## `build`
`Dockerfile` docker-compose.yml `Compose` 使
@ -62,7 +62,7 @@ build:
- corp/web_app:3.14
```
### `cap_add, cap_drop`
## `cap_add, cap_drop`
capacity
@ -80,7 +80,7 @@ cap_drop:
- NET_ADMIN
```
### `command`
## `command`
@ -88,11 +88,11 @@ cap_drop:
command: echo "hello world"
```
### `configs`
## `configs`
`Swarm mode` [`Swarm mode`](../swarm_mode/)
### `cgroup_parent`
## `cgroup_parent`
`cgroup`
@ -102,7 +102,7 @@ command: echo "hello world"
cgroup_parent: cgroups_1
```
### `container_name`
## `container_name`
使 `项目名称_服务名称_序号`
@ -112,11 +112,11 @@ container_name: docker-web-container
>: scale Docker
### `deploy`
## `deploy`
`Swarm mode` [`Swarm mode`](../swarm_mode/)
### `devices`
## `devices`
@ -125,7 +125,7 @@ devices:
- "/dev/ttyUSB1:/dev/ttyUSB0"
```
### `depends_on`
## `depends_on`
`redis` `db` `web`
@ -148,7 +148,7 @@ services:
>`web` `redis` `db`
### `dns`
## `dns`
`DNS`
@ -160,7 +160,7 @@ dns:
- 114.114.114.114
```
### `dns_search`
## `dns_search`
`DNS`
@ -172,7 +172,7 @@ dns_search:
- domain2.example.com
```
### `tmpfs`
## `tmpfs`
tmpfs
@ -183,7 +183,7 @@ tmpfs:
- /tmp
```
### `env_file`
## `env_file`
@ -207,7 +207,7 @@ env_file:
PROG_ENV=development
```
### `environment`
## `environment`
使
@ -223,13 +223,13 @@ environment:
- SESSION_SECRET
```
`true|falseyes|no` [](http://yaml.org/type/bool.html) 含义的词汇,最好放到引号里,避免 YAML 自动解析某些内容为对应的布尔语义。这些特定词汇,包括
`true|falseyes|no` [](https://yaml.org/type/bool.html) 含义的词汇,最好放到引号里,避免 YAML 自动解析某些内容为对应的布尔语义。这些特定词汇,包括
```bash
y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF
```
### `expose`
## `expose`
宿访
@ -241,7 +241,7 @@ expose:
- "8000"
```
### `external_links`
## `external_links`
>使
@ -254,7 +254,7 @@ external_links:
- project_db_1:postgresql
```
### `extra_hosts`
## `extra_hosts`
Docker `--add-host` host
@ -271,7 +271,7 @@ extra_hosts:
52.1.157.61 dockerhub
```
### `healthcheck`
## `healthcheck`
@ -283,7 +283,7 @@ healthcheck:
retries: 3
```
### `image`
## `image`
ID`Compose`
@ -293,7 +293,7 @@ image: orchardup/postgresql
image: a4bc65fd
```
### `labels`
## `labels`
Docker metadata
@ -304,11 +304,11 @@ labels:
com.startupteam.release: "rc3 for v1.0"
```
### `links`
## `links`
>使
### `logging`
## `logging`
@ -335,7 +335,7 @@ options:
max-file: "10"
```
### `network_mode`
## `network_mode`
使 `docker run` `--network`
@ -347,7 +347,7 @@ network_mode: "service:[service name]"
network_mode: "container:[container name/id]"
```
### `networks`
## `networks`
@ -365,7 +365,7 @@ networks:
other-network:
```
### `pid`
## `pid`
宿 ID 访
@ -373,7 +373,7 @@ networks:
pid: "host"
```
### `ports`
## `ports`
@ -389,7 +389,7 @@ ports:
*使 `HOST:CONTAINER` 使 60 `YAML` `xx:yy` 60 *
### `secrets`
## `secrets`
`mysql`
@ -412,7 +412,7 @@ secrets:
external: true
```
### `security_opt`
## `security_opt`
label
@ -422,7 +422,7 @@ security_opt:
- label:role:ROLE
```
### `stop_signal`
## `stop_signal`
使 SIGTERM
@ -430,7 +430,7 @@ security_opt:
stop_signal: SIGUSR1
```
### `sysctls`
## `sysctls`
@ -444,7 +444,7 @@ sysctls:
- net.ipv4.tcp_syncookies=0
```
### `ulimits`
## `ulimits`
ulimits
@ -458,9 +458,9 @@ sysctls:
hard: 40000
```
### `volumes`
## `volumes`
宿 `HOST:CONTAINER` 访 `HOST:CONTAINER:ro`
宿(`HOST:CONTAINER`)(`VOLUME:CONTAINER`)访 `HOST:CONTAINER:ro`
@ -471,7 +471,22 @@ volumes:
- ~/configs:/etc/configs/:ro
```
###
```yaml
version: "3"
services:
my_src:
image: mysql:8.0
volumes:
- mysql_data:/var/lib/mysql
volumes:
mysql_data:
```
##
`domainname, entrypoint, hostname, ipc, mac_address, privileged, read_only, shm_size, restart, stdin_open, tty, user, working_dir` `docker run`
@ -531,7 +546,7 @@ stdin_open: true
tty: true
```
###
##
Compose `.env`
@ -557,3 +572,8 @@ MONGO_VERSION=3.6
```
`docker-compose up` `mongo:3.6`
##
* [](https://docs.docker.com/compose/compose-file/)
* [awesome-compose](https://github.com/docker/awesome-compose)

View File

@ -1 +1,2 @@
django_example
manage.py

View File

@ -3,13 +3,13 @@ services:
db:
image: postgres
environment:
POSTGRES_PASSWORD: 'postgres'
web:
build: .
command: python3 manage.py runserver 0.0.0.0:8000
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
links:
- db

View File

@ -1,22 +0,0 @@
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_example.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
# issue is really that Django is missing to avoid masking other
# exceptions on Python 2.
try:
import django
except ImportError:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
)
raise
execute_from_command_line(sys.argv)

View File

@ -1,2 +1,2 @@
Django>=1.8,<2.0
psycopg2
Django>=2.0,<3.0
psycopg2>=2.7,<3.0

View File

@ -2,7 +2,11 @@ version: "3"
services:
db:
image: mysql:5.7
image: mysql:8.0
command:
- --default_authentication_plugin=mysql_native_password
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
volumes:
- db_data:/var/lib/mysql
restart: always

View File

@ -1,6 +1,6 @@
## 使 Django
# 使 Django
`Python`
> `Python`
使 `Docker Compose` `Django/PostgreSQL`
@ -13,18 +13,18 @@ FROM python:3
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
ADD requirements.txt /code/
COPY requirements.txt /code/
RUN pip install -r requirements.txt
ADD . /code/
COPY . /code/
```
使 Python `Dockerfile` [](../image/create.md# Dockerfile ) [ Dockerfile 使](../dockerfile/README.md)
使 Python `Dockerfile` [ Dockerfile 使](../image/dockerfile/README.md)
`requirements.txt`
```bash
Django>=1.8,<2.0
psycopg2
Django>=2.0,<3.0
psycopg2>=2.7,<3.0
```
`docker-compose.yml` 西 web 使 Docker
@ -35,27 +35,27 @@ services:
db:
image: postgres
environment:
POSTGRES_PASSWORD: 'postgres'
web:
build: .
command: python3 manage.py runserver 0.0.0.0:8000
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
links:
- db
```
[`docker-compose.yml` ](yml_ref.md)
[`docker-compose.yml` ](compose_file.md)
使 `docker-compose run` `Django`
```bash
$ docker-compose run web django-admin.py startproject django_example .
$ docker-compose run web django-admin startproject django_example .
```
Compose 使 `Dockerfile` web 使 `django-admin.py startproject django_example`
web 使 Compose 使 `Dockerfile` web 使 `django-admin startproject django_example`
`Django`
@ -67,7 +67,7 @@ Dockerfile docker-compose.yml django_example manage.py
Linux,
```bash
sudo chown -R $USER:$USER .
$ sudo chown -R $USER:$USER .
```
`django_example/settings.py` `DATABASES = ...`
@ -80,6 +80,7 @@ DATABASES = {
'USER': 'postgres',
'HOST': 'db',
'PORT': 5432,
'PASSWORD': 'postgres',
}
}
```

View File

@ -1,33 +1,35 @@
##
#
`Compose` LinuxmacOSWindows 10
`Compose` Python `pip` 使 Docker
使
`Docker for Mac` `Docker for Windows` `docker-compose` Docker 使
`Docker Desktop for Mac/Windows` `docker-compose` Docker 使
```bash
$ docker-compose --version
docker-compose version 1.17.1, build 6d101fb
docker-compose version 1.27.4, build 40524192
```
Linux 使
###
##
Linux [ GitHub Release](https://github.com/docker/compose/releases) 处直接下载编译好的二进制文件即可。
Linux 64
```bash
$ sudo curl -L https://github.com/docker/compose/releases/download/1.17.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
$ sudo curl -L https://github.com/docker/compose/releases/download/1.27.4/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
# 使
$ sudo curl -L https://download.fastgit.org/docker/compose/releases/download/1.27.4/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose
```
### PIP
## PIP
** `x86_64` Linux `ARM` ()使 `pip`
@ -43,75 +45,18 @@ $ sudo pip install -U docker-compose
```bash
Collecting docker-compose
Downloading docker-compose-1.17.1.tar.gz (149kB): 149kB downloaded
Downloading docker-compose-1.27.4.tar.gz (149kB): 149kB downloaded
...
Successfully installed docker-compose cached-property requests texttable websocket-client docker-py dockerpty six enum34 backports.ssl-match-hostname ipaddress
```
### bash
## bash
```bash
$ curl -L https://raw.githubusercontent.com/docker/compose/1.8.0/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose
$ curl -L https://raw.githubusercontent.com/docker/compose/1.27.4/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose
```
###
Compose Python
```bash
$ curl -L https://github.com/docker/compose/releases/download/1.8.0/run.sh > /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose
```
`run.sh`
```bash
set -e
VERSION="1.8.0"
IMAGE="docker/compose:$VERSION"
# Setup options for connecting to docker host
if [ -z "$DOCKER_HOST" ]; then
DOCKER_HOST="/var/run/docker.sock"
fi
if [ -S "$DOCKER_HOST" ]; then
DOCKER_ADDR="-v $DOCKER_HOST:$DOCKER_HOST -e DOCKER_HOST"
else
DOCKER_ADDR="-e DOCKER_HOST -e DOCKER_TLS_VERIFY -e DOCKER_CERT_PATH"
fi
# Setup volume mounts for compose config and context
if [ "$(pwd)" != '/' ]; then
VOLUMES="-v $(pwd):$(pwd)"
fi
if [ -n "$COMPOSE_FILE" ]; then
compose_dir=$(dirname $COMPOSE_FILE)
fi
# TODO: also check --file argument
if [ -n "$compose_dir" ]; then
VOLUMES="$VOLUMES -v $compose_dir:$compose_dir"
fi
if [ -n "$HOME" ]; then
VOLUMES="$VOLUMES -v $HOME:$HOME -v $HOME:/root" # mount $HOME in /root to share docker.config
fi
# Only allocate tty if we detect one
if [ -t 1 ]; then
DOCKER_RUN_OPTIONS="-t"
fi
if [ -t 0 ]; then
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS -i"
fi
exec docker run --rm $DOCKER_RUN_OPTIONS $DOCKER_ADDR $COMPOSE_OPTIONS $VOLUMES -w "$(pwd)" $IMAGE "$@"
```
`docker/compose`
###
##

View File

@ -1,4 +1,4 @@
## Compose
# Compose
`Compose` Docker Docker `OpenStack` `Heat`

3
compose/lnmp.md Normal file
View File

@ -0,0 +1,3 @@
# 使 compose LNMP
[khs1994](https://github.com/khs1994) 的开源项目 [khs1994-docker/lnmp](https://github.com/khs1994-docker/lnmp) 使用 Docker Compose 搭建了一套 LNMP 环境,各位开发者可以参考该项目在 Docker 或 Kubernetes 中运行 LNMP。

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