Compare commits

...

100 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
138 changed files with 1227 additions and 1963 deletions

View File

@ -1,3 +1,5 @@
// https://code.visualstudio.com/docs/remote/devcontainerjson-reference
{
"image": "yeasy/docker_practice:latest",
"mounts": [

1
.github/CODEOWNERS vendored
View File

@ -28,7 +28,6 @@
/.editorconfig/ @khs1994
/.gitattributes @khs1994
/.gitignore @khs1994
/.travis.yml @khs1994
/_config.yml @yeasy @khs1994
/book.json @yeasy @khs1994
/CHANGELOG.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

@ -21,11 +21,11 @@ about: Create a report to help us improve
* [x] Others (Pls describe below)
### Docker Version
<!-- Docker 19.03 Docker -->
<!--if Docker version under 19.03, please upgrade Docker to 19.03-->
<!-- Docker 20.10 Docker -->
<!--if Docker version under 20.10, please upgrade Docker to 20.10-->
* [x] Edge (v19.03)
* [x] Stable (v19.03)
* [x] Test (v20.10)
* [x] Stable (v20.10)
* [x] 1.13.0 or Before
### Problem Description

View File

@ -21,11 +21,11 @@ about: Create a issue about Docker
* [x] Others (Pls describe below)
### Docker Version
<!-- Docker 19.03 Docker -->
<!--if Docker version under 19.03, please upgrade Docker to 19.03-->
<!-- Docker 20.10 Docker -->
<!--if Docker version under 20.10, please upgrade Docker to 20.10-->
* [x] Edge (v19.03)
* [x] Stable (v19.03)
* [x] Test (v20.10)
* [x] Stable (v20.10)
* [x] 1.13.0 or Before
### Problem Description

View File

@ -1,8 +1,6 @@
name: check-link
name: Check link
on:
# push:
# pull_request:
workflow_dispatch:
jobs:
@ -10,9 +8,7 @@ jobs:
name: check-link
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 1
- uses: actions/checkout@v4.1.1
# search Issues :-(
- run: |
docker run -i --rm \
@ -25,7 +21,6 @@ jobs:
"192.168.199.100",\
"github.com/settings",\
"github.com/docker/compose/releases/download",\
"github.com/docker/machine/releases/download",\
"github.com/etcd-io/etcd/releases/download",\
"github.com/tianon/gosu/releases/download",\
"github.com/yeasy/docker_practice",\
@ -37,7 +32,6 @@ jobs:
"nodejs.org/dist/",\
"c.163.com/hub",\
"drone.yeasy.com",\
"mirrors.ustc.edu.cn",\
"docs.docker.com",\
"dockerhub.azk8s.cn",\
"reg-mirror.qiniu.com",\
@ -52,7 +46,6 @@ jobs:
"security.ubuntu.com/ubuntu",\
"nginx.com",\
"img.shields.io/github/release/yeasy/docker_practice",\
"travis-ci.org/yeasy/docker_practice.svg",\
"launchpad.net",\
"www.w3.org/1999",\
"chat.freenode.net",\
@ -60,12 +53,13 @@ jobs:
"product.china-pub.com",\
"union-click.jd.com",\
"x.x.x.x/base",\
"x.x.x.x:9000/minio/",\
"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 "./machine" -o -path "./swarm_mode" \) -prune -o -name "*.md" -exec ls {} \;`
`find . \( -path "./mesos" -o -path "./swarm_mode" \) -prune -o -name "*.md" -exec ls {} \;`
name: check-link
timeout-minutes: 25

View File

@ -1,37 +1,84 @@
name: CI
on:
push:
pull_request:
workflow_dispatch:
name: CI
defaults:
run:
shell: bash --noprofile --norc -exo pipefail {0}
jobs:
build:
name: Build GitBook
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 2
- name: Build
- 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 vuepress --save-dev
npm i
git clone https://github.com/docker-practice/.vuepress .vuepress2
cp -r .vuepress2/. .vuepress/
rm -rf .vuepress2
find . \( -path "./mesos" -o -path "./machine" -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' {} \;
find . \( -path "./mesos" -o -path "./swarm_mode" -o -path "./node_modules" -o -path "./.vuepress" -o -path "./_book" -o -path "./CHANGELOG.md" -o -path "./CONTRIBUTING.md" \) -prune -o -name "*.md" -exec sed -i 'N;2a\<AdSenseTitle/>\n' {} \;
npx vuepress --version
npm run vuepress:build
echo "vuepress.docker-practice.com" > .vuepress/dist/CNAME
echo "vuepress.mirror.docker-practice.com" > .vuepress/dist/CNAME
cp -r _images .vuepress/dist
cp -r advanced_network/_images .vuepress/dist/advanced_network
@ -45,7 +92,6 @@ jobs:
cp -r install/_images .vuepress/dist/install
cp -r introduction/_images .vuepress/dist/introduction
cp -r kubernetes/_images .vuepress/dist/kubernetes
cp -r mesos/_images .vuepress/dist/mesos
cp -r underly/_images .vuepress/dist/underly
echo "include: [_images]" > .vuepress/dist/_config.yml
@ -58,30 +104,30 @@ jobs:
PCIT_GIT_URL: github.com/docker-practice/vuepress
PCIT_KEEP_HISTORY: "true"
PCIT_LOCAL_DIR: .vuepress/dist
PCIT_MESSAGE: Sync from yeasy/docker_practice@${{github.sha}} by PCIT
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: Sync from yeasy/docker_practice@${{github.sha}} by PCIT
PCIT_TARGET_BRANCH: master
PCIT_USERNAME: ptt0xjqzbke3
# - 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 "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
@ -98,9 +144,13 @@ jobs:
docker push dockerpracticesig/docker_practice:vuepress
docker run -it --rm -d -p 4000:80 dockerpracticesig/docker_practice:vuepress
docker run -it --rm -d -p 4001:80 dockerpracticesig/docker_practice:vuepress
curl 127.0.0.1:4000
sleep 5
echo "::group::Test"
curl 127.0.0.1:4001
echo "::endgroup::"
env:
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}

2
.gitignore vendored
View File

@ -9,3 +9,5 @@ _book/
node_modules/
package-lock.json
docker-compose.override.yml

View File

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

Binary file not shown.

View File

@ -1,8 +1,6 @@
const resolve = require("vuepress-theme-hope/resolve");
// const { config } = require('vuepress-theme-hope')
const { config } = require('vuepress-theme-hope')
// module.exports =config({
module.exports = resolve({
module.exports = config({
title: 'Docker ',
base: '/',
head: [['script', {}, `
@ -40,6 +38,11 @@ module.exports = resolve({
// onlyFirstAndLastCommit: true,
// },
},
locales: {
"/": {
lang: "zh-CN"
}
},
themeConfig: {
blog: false,
// comment: false,
@ -49,29 +52,40 @@ module.exports = resolve({
appKey: "...", // your appKey
},
pageInfo: [
// 'Author',
'ReadTime',
'Word',
// 'author',
'reading-time',
'word',
],
footer: {
content: "Made with <a target='_blank' href='https://github.com/mister-hope/vuepress-theme-hope'>vuepress-theme-hope</a>",
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',
markdown: {
mdEnhance: {
lineNumbers: true,
},
git: {
contributor: false,
},
themeColor: {
blue: '#2196f3',
// red: '#f26d6d',
// green: '#3eaf7c',
// orange: '#fb9b5f'
},
locales: {
"/": {
lang: "zh-CN"
}
},
darkmode: 'auto-switch',
//
@ -84,11 +98,11 @@ module.exports = resolve({
nav: [
{
text: '',
link: 'https://yewm28.coding-pages.com/wechat.jpg',
link: 'https://docker_practice.gitee.io/pic/dpsig-wechat.jpg',
},
{
text: '',
link: 'https://yewm28.coding-pages.com/49682252-3ac4c500-faec-11e8-86ab-eafe0139be6b.jpg',
link: 'https://docker_practice.gitee.io/pic/dp-wechat-miniprogram.jpg',
},
{
text: ' Docker',
@ -118,17 +132,17 @@ module.exports = resolve({
text: "云计算",
link: "/cloud/",
},
{
text: 'GitHub',
link: 'https://github.com/yeasy/docker_practice'
},
// {
// text: 'GitHub',
// link: 'https://github.com/yeasy/docker_practice'
// },
// {
// text: '捐赠',
// link: ''
// },
{
text: '',
link: 'https://cloud.tencent.com/act/cps/redirect?redirect=10058&cps_key=3a5255852d5db99dcd5da4c72f05df61'
text: '99/',
link: 'https://cloud.tencent.com/act/cps/redirect?redirect=1062&cps_key=3a5255852d5db99dcd5da4c72f05df61&from=console'
},
// {
// text: '语言',
@ -152,7 +166,7 @@ module.exports = resolve({
'design',
{
title: "部署 Kubernetes",
collapsable: false,
collapsable: true,
children: [
"setup/",
"setup/kubeadm",
@ -163,7 +177,7 @@ module.exports = resolve({
},
{
title: "Kubernetes 命令行 kubectl",
collapsable: false,
collapsable: true,
children: [
'kubectl/'
]
@ -171,6 +185,7 @@ module.exports = resolve({
],
'/compose/': [
'introduction',
'v2',
'install',
'usage',
'commands',
@ -185,9 +200,8 @@ module.exports = resolve({
'debian',
'fedora',
'centos',
'centos8',
'raspberry-pi',
'offline',
// 'offline',
'mac',
'windows',
'mirror',
@ -218,13 +232,12 @@ module.exports = resolve({
'actions/',
{
title: "Drone",
collapsable: false,
collapsable: true,
children: [
'drone/',
'drone/install'
]
},
'travis/'
],
'/': [
'/',
@ -264,7 +277,7 @@ module.exports = resolve({
},
{
title: 'Dockerfile',
collapsable: false,
collapsable: true,
children: [
"image/dockerfile/",
'image/dockerfile/copy',
@ -330,7 +343,7 @@ module.exports = resolve({
},
{
title: "高级网络配置",
collapsable: false,
collapsable: true,
children: [
'advanced_network/',
'advanced_network/quick_guide',
@ -344,7 +357,7 @@ module.exports = resolve({
},
{
title: "Swarm mode",
collapsable: false,
collapsable: true,
children: [
'swarm_mode/',
'swarm_mode/overview',
@ -358,7 +371,7 @@ module.exports = resolve({
},
{
title: "安全",
collapsable: false,
collapsable: true,
children: [
'security/',
'security/kernel_ns',
@ -371,7 +384,7 @@ module.exports = resolve({
},
{
title: "底层实现",
collapsable: false,
collapsable: true,
children: [
'underly/',
'underly/arch',
@ -394,7 +407,7 @@ module.exports = resolve({
},
{
title: "Etcd",
collapsable: false,
collapsable: true,
children: [
'etcd/',
'etcd/intro',
@ -405,7 +418,7 @@ module.exports = resolve({
},
{
title: "Fedora CoreOS",
collapsable: false,
collapsable: true,
children: [
'coreos/',
'coreos/intro',
@ -416,7 +429,7 @@ module.exports = resolve({
'appendix/faq/',
{
title: "热门镜像介绍",
collapsable: false,
collapsable: true,
children: [
'appendix/repo/',
'appendix/repo/ubuntu',
@ -433,7 +446,7 @@ module.exports = resolve({
},
{
title: "Docker 命令",
collapsable: false,
collapsable: true,
children: [
'appendix/command/',
'appendix/command/docker',

View File

@ -1,6 +1,12 @@
#
* 1.2.0 2020-12-31
* 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

View File

@ -1,14 +1,12 @@
# Docker
[![](https://img.shields.io/github/stars/yeasy/docker_practice.svg?style=social&label=Stars)](https://github.com/yeasy/docker_practice) [![](https://travis-ci.org/yeasy/docker_practice.svg?branch=master)](https://travis-ci.org/yeasy/docker_practice) [![](https://img.shields.io/github/release/yeasy/docker_practice/all.svg)](https://github.com/yeasy/docker_practice/releases) [![](https://img.shields.io/badge/Based-Docker%20CE%20v19.03-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]
[![](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.2.0**
**v1.3.0**
| | | - |
| :------------- | :------------- | :--- |
| [zh-hans](https://github.com/yeasy/docker_practice) | [![](https://travis-ci.org/yeasy/docker_practice.svg?branch=master)](https://travis-ci.org/yeasy/docker_practice)| [阅读](https://vuepress.mirror.docker-practice.com/) |
| [us-en](https://github.com/yeasy/docker_practice/tree/english) | [![](https://travis-ci.org/yeasy/docker_practice.svg?branch=english)](https://travis-ci.org/yeasy/docker_practice)| [阅读](https://docker_practice.gitee.io/us-en) |
| [zh-hant](https://github.com/yeasy/docker_practice/tree/zh-Hant) | [![](https://travis-ci.org/yeasy/docker_practice.svg?branch=zh-hant)](https://travis-ci.org/yeasy/docker_practice)| [阅读](https://docker_practice.gitee.io/zh-hant) |
| | - |
| :------------- | :--- |
| [](https://github.com/yeasy/docker_practice) | [阅读](https://vuepress.mirror.docker-practice.com/) |
[Docker](https://www.docker.com) 是个划时代的开源项目,它彻底释放了计算虚拟化的威力,极大提高了应用的维护效率,降低了云计算应用开发的成本!使用 Docker可以让应用的部署、测试和分发都变得前所未有的高效和轻松
@ -17,7 +15,7 @@
Linux Docker Docker 7 ~ 9 10 ~ 12 1314 Docker EtcdFedora CoreOSKubernetes使
* 线[docker-practice.com](https://vuepress.mirror.docker-practice.com/)[GitBook](https://yeasy.gitbook.io/docker_practice/)[Github](https://github.com/yeasy/docker_practice/blob/master/SUMMARY.md)
* [线 `$ docker run -it --rm -p 4000:80 ccr.ccs.tencentyun.com/dockerpracticesig/docker_practice:vuepress`](https://github.com/yeasy/docker_practice/wiki/%E7%A6%BB%E7%BA%BF%E9%98%85%E8%AF%BB%E5%8A%9F%E8%83%BD%E8%AF%A6%E8%A7%A3)
* 线[`$ docker 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)
@ -27,7 +25,7 @@ Docker 自身仍在快速发展中,生态环境也在蓬勃成长。建议初
##
<p align="center">
<img width="200" src="https://yewm28.coding-pages.com/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>
@ -35,7 +33,7 @@ Docker 自身仍在快速发展中,生态环境也在蓬勃成长。建议初
##
<p align="center">
<img width="200" src="https://yewm28.coding-pages.com/wechat.jpg">
<img width="200" src="https://docker_practice.gitee.io/pic/dpsig-wechat.jpg">
</p>
<p align="center"><strong> ~ <code>dpsigs</code> </strong></p>
@ -53,7 +51,7 @@ Docker 自身仍在快速发展中,生态环境也在蓬勃成长。建议初
* QQ IX 571502246
* QQ X 145983035
> [Issues](https://github.com/yeasy/docker_practice/issues/new/choose) 来提出。
> [Issues](https://github.com/yeasy/docker_practice/issues/new/choose) 来提出。
##
@ -72,4 +70,4 @@ Docker 自身仍在快速发展中,生态环境也在蓬勃成长。建议初
<p align="center"><strong> coffee~</strong></p>
[1]: https://union-click.jd.com/jdc?e=&p=AyIGZRtYFAcXBFIZWR0yEgRQH1kXAhs3EUQDS10iXhBeGlcJDBkNXg9JHU4YDk5ER1xOGRNLGEEcVV8BXURFUFdfC0RVU1JRUy1OVxUBFwNXGVscMlVYLlAaXAV1Z1JHA0dWEHVXZTliY1QLWStaJQAWB10fXhwKEDdlG1wlUHzf462DsLMO0%2F%2BUjp2VIgZlG18RBBcCUBlbEAoTBWUcWxwySVI7HAhBBxEOBUgOFQYQUGUraxYyIjdVK1glQHxXUEhYEVEUUFQcC0IHGgRRSAgVARAPAhsLFgNCDl0ZWiUAEwZREg%3D%3D&t=W1dCFFlQCxxKQgFHREkdSVJKSQVJHFRXFk9FUlpGQUpLCVBaTFhbXQtWVmpSWRtYEAYQBVUS
[1]: https://union-click.jd.com/jdc?e=&p=JF8AANADIgZlGF0VAxUDVBJdHDISBFAfWRcCGzcRRANLXSJeEF4aVwkMGQ1eD0kdSVJKSQVJHBIEUB9ZFwIbGAxeB0gyS34PbFlHVHNkI0MQEAoIcSxyBWFLRAtZK1olABYHXR9eHAoQN2UbXCVQfN_jrYOwsw7T_5SOnZUiBmUbXBYBFwBVG14UBBAAZRxbHDJJUjscCEEHEQ4FSA4VBhBQZStrFjIiN1UrWCVAfARQT1gQA0cFAEwOEAcRDlMTDEALQAFTEwwRUhMAUR1cJQATBlES

View File

@ -4,182 +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)
* [CentOS8](install/centos8.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)
* [Ubuntu](install/ubuntu.md)
* [Debian](install/debian.md)
* [Fedora](install/fedora.md)
* [CentOS](install/centos.md)
* [Raspberry Pi](install/raspberry-pi.md)
* [Linux 线](install/offline.md)
* [macOS](install/mac.md)
* [Windows 10](install/windows.md)
* [](install/mirror.md)
* [](install/experimental.md)
* [使](image/README.md)
* [](image/pull.md)
* [](image/list.md)
* [](image/rm.md)
* [ commit ](image/commit.md)
* [使 Dockerfile ](image/build.md)
* [Dockerfile ](image/dockerfile/README.md)
* [COPY ](image/dockerfile/copy.md)
* [ADD ](image/dockerfile/add.md)
* [CMD ](image/dockerfile/cmd.md)
* [ENTRYPOINT ](image/dockerfile/entrypoint.md)
* [ENV ](image/dockerfile/env.md)
* [ARG ](image/dockerfile/arg.md)
* [VOLUME ](image/dockerfile/volume.md)
* [EXPOSE ](image/dockerfile/expose.md)
* [WORKDIR ](image/dockerfile/workdir.md)
* [USER ](image/dockerfile/user.md)
* [HEALTHCHECK ](image/dockerfile/healthcheck.md)
* [ONBUILD ](image/dockerfile/onbuild.md)
* [LABEL ](image/dockerfile/label.md)
* [SHELL ](image/dockerfile/shell.md)
* [](image/dockerfile/references.md)
* [Dockerfile ](image/multistage-builds/README.md)
* [ Laravel ](image/multistage-builds/laravel.md)
* [ Docker ](image/manifest.md)
* [](image/other.md)
* [](image/internal.md)
* [](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)
* [](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)
* [BuildKit](buildx/buildkit.md)
* [使 buildx ](buildx/buildx.md)
* [使 buildx Docker ](buildx/multi-arch-images.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)
* [ LNMP](compose/lnmp.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)
* [](etcd/intro.md)
* [](etcd/install.md)
* [](etcd/cluster.md)
* [使 etcdctl](etcd/etcdctl.md)
* [Fedora CoreOS](coreos/README.md)
* [](coreos/intro.md)
* [](coreos/install.md)
* [](coreos/intro.md)
* [](coreos/install.md)
* [Kubernetes - ](kubernetes/README.md)
* [](kubernetes/intro.md)
* [](kubernetes/concepts.md)
* [](kubernetes/design.md)
* [](kubernetes/intro.md)
* [](kubernetes/concepts.md)
* [](kubernetes/design.md)
* [ Kubernetes](kubernetes/setup/README.md)
* [使 kubeadm kubernetes](kubernetes/setup/kubeadm.md)
* [ Docker Desktop 使](kubernetes/setup/docker-desktop.md)
* [ kubernetes ](kubernetes/setup/systemd.md)
* [ Dashboard](kubernetes/setup/dashboard.md)
* [使 kubeadm kubernetes(CRI 使 containerd)](kubernetes/setup/kubeadm.md)
* [ Docker Desktop 使](kubernetes/setup/docker-desktop.md)
* [ kubernetes ](kubernetes/setup/systemd.md)
* [ Dashboard](kubernetes/setup/dashboard.md)
* [Kubernetes kubectl](kubernetes/kubectl/README.md)
* [](cloud/README.md)
* [](cloud/intro.md)
* [](cloud/tencentCloud.md)
* [](cloud/alicloud.md)
* [](cloud/aws.md)
* [](cloud/summary.md)
* [](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)
* [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)
* [Travis CI](cases/ci/travis/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)
* [VS Code](ide/vsCode.md)
* [podman - Linux ](podman/README.md)
* [](appendix/README.md)
* [](appendix/faq/README.md)
* [](appendix/repo/README.md)
* [Ubuntu](appendix/repo/ubuntu.md)
* [CentOS](appendix/repo/centos.md)
* [Nginx](appendix/repo/nginx.md)
* [PHP](appendix/repo/php.md)
* [Node.js](appendix/repo/nodejs.md)
* [MySQL](appendix/repo/mysql.md)
* [WordPress](appendix/repo/wordpress.md)
* [MongoDB](appendix/repo/mongodb.md)
* [Redis](appendix/repo/redis.md)
* [Minio](appendix/repo/minio.md)
* [Docker ](appendix/command/README.md)
* [ - docker](appendix/command/docker.md)
* [ - dockerd](appendix/command/dockerd.md)
* [Dockerfile ](appendix/best_practices.md)
* [ Docker](appendix/debug.md)
* [](appendix/resources.md)
* [](archive/README.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)
* [Docker Machine](machine/README.md)
* [](machine/install.md)
* [使](machine/usage.md)
* [Docker Swarm](swarm/README.md)
* [](appendix/faq/README.md)
* [](appendix/repo/README.md)
* [Ubuntu](appendix/repo/ubuntu.md)
* [CentOS](appendix/repo/centos.md)
* [Nginx](appendix/repo/nginx.md)
* [PHP](appendix/repo/php.md)
* [Node.js](appendix/repo/nodejs.md)
* [MySQL](appendix/repo/mysql.md)
* [WordPress](appendix/repo/wordpress.md)
* [MongoDB](appendix/repo/mongodb.md)
* [Redis](appendix/repo/redis.md)
* [Minio](appendix/repo/minio.md)
* [Docker ](appendix/command/README.md)
* [ - docker](appendix/command/docker.md)
* [ - dockerd](appendix/command/dockerd.md)
* [Dockerfile ](appendix/best_practices.md)
* [ Docker](appendix/debug.md)
* [](appendix/resources.md)

View File

@ -6,10 +6,10 @@
Docker `docker0` Linux bridge
Docker [RFC1918](https://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,4 +1,5 @@
# 访
访 Linux `iptables` `iptables` Linux
## 访

View File

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

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

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

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

@ -1,8 +1,8 @@
# minio
[TOC]
MinIO Apache License v2.0S3/kb5T
MinIO, NodeJS, Redis MySQL
**MinIO** Apache License v2.0 S3 / kb 5T
MinIO , NodeJS, Redis MySQL
[](https://docs.min.io/)
@ -11,12 +11,9 @@ MinIO是一个非常轻量的服务,可以很简单的和其他应用的结合
使
```bash
docker pull minio/minio
docker run -p 9000:9000 minio/minio server /data
$ docker run -d -p 9000:9000 -p 9090:9090 minio/minio server /data --console-address ':9090'
```
## 线
@ -26,37 +23,36 @@ docker run -p 9000:9000 minio/minio server /data
`minio/minio`
```bash
docker save -o minio.tar minio/minio:latest
$ docker save -o minio.tar minio/minio:latest
```
<!--使docker save 使image id 使+tag-->
> 使docker save 使image id 使+tag
###
使
```bash
docker load minio.tar
$ docker load minio.tar
```
### minio
- /mnt/data
- MINIO_ACCESS_KEY
- MINIO_SECRET_KEY
- `/mnt/data`
- `MINIO_ROOT_USER`
- `MINIO_ROOT_PASSWORD`
- name,minio1()
- 9000,:9009:9000
- 90009090 , `9009:9000`
```bash
sudo docker run -d -p 9000:9000 --name minio1 \
-e "MINIO_ACCESS_KEY=改成自己需要的" \
-e "MINIO_SECRET_KEY=改成自己需要的" \
$ 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
minio/minio server /data --console-address ':9090'
```
### 访 web
http://x.x.x.x:9000/minio/
http://x.x.x.x:9090

View File

@ -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,7 +39,8 @@ 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
```

View File

@ -10,7 +10,7 @@
Dockerfile
```bash
```docker
FROM node:12
# replace this with your application's default port
EXPOSE 8888

View File

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

View File

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

View File

@ -1,12 +1,12 @@
# 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

@ -14,16 +14,16 @@
Docker Registry 使 Registry
使 Registry [Docker Hub](https://hub.docker.com/),这也是默认的 Registry并拥有大量的高质量的官方镜像。除此以外,还有 Red Hat 的 [Quay.io](https://quay.io/repository/)Google 的 [Google Container Registry](https://cloud.google.com/container-registry/)[Kubernetes](https://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://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 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[Harbor](https://github.com/goharbor/harbor) 和 [Sonatype Nexus](../repository/nexus3_registry.md)。

View File

@ -1,9 +1,5 @@
# 使 Buildx
## Buildx
`buildx` [](../install/experimental.md) Docker CLI
## 使
使 `docker buildx build`

View File

@ -25,4 +25,4 @@ jobs:
##
* [Actions Docs](https://docs.github.com/en/free-pro-team@latest/actions)
* [Actions Docs](https://docs.github.com/en/actions)

View File

@ -86,7 +86,7 @@ $ git push origin master
`Drone` Drone Cloud
![](_images/drone-build.png)
![](./_images/drone-build.png)
GitHubDocker Registry

View File

@ -3,7 +3,7 @@ version: '3'
services:
drone-server:
image: drone/drone:1
image: drone/drone:2.3.1
ports:
- 443:443
- 80:80
@ -12,7 +12,6 @@ services:
- ./ssl:/etc/certs
restart: always
environment:
- DRONE_AGENTS_ENABLED=true
- DRONE_SERVER_HOST=${DRONE_SERVER_HOST:-drone.domain.com}
- DRONE_SERVER_PROTO=${DRONE_SERVER_PROTO:-https}
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET:-secret}

View File

@ -30,7 +30,7 @@ version: '3'
services:
drone-server:
image: drone/drone:1
image: drone/drone:2.3.1
ports:
- 443:443
- 80:80
@ -39,7 +39,6 @@ services:
- ./ssl:/etc/certs
restart: always
environment:
- DRONE_AGENTS_ENABLED=true
- DRONE_SERVER_HOST=${DRONE_SERVER_HOST:-https://drone.yeasy.com}
- DRONE_SERVER_PROTO=${DRONE_SERVER_PROTO:-https}
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET:-secret}

View File

@ -1,47 +0,0 @@
# Travis CI 使 Docker
GitHub [Travis CI](https://travis-ci.com/) 会根据项目根目录 `.travis.yml` 文件设置的指令,执行一系列操作。
Travis CI 使 Docker /CI/CD GitHub Docker Docker Hub
##
https://travis-ci.com/account/repositories 选择 GitHub 仓库,按照指引安装 GitHub App 来启用 GitHub 仓库构建。
`Dockerfile`
```docker
FROM alpine
RUN echo "Hello World"
```
Travis CI `.travis.yml`
```yml
language: bash
dist: xenial
services:
- docker
before_script:
# docker hub
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
script:
#
- echo "test code"
after_success:
#
- docker build -t username/alpine .
- docker push username/alpine
```
> Travis CI `DOCKER_PASSWORD` `DOCKER_USERNAME`
##
GitHub [Travis CI](https://travis-ci.com/) 查看构建详情。

View File

@ -1,16 +0,0 @@
language: bash
dist: xenial
services:
- docker
before_script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
script:
- echo "test code"
after_success:
- docker build -t username/alpine .
- docker push username/alpine

View File

@ -1,3 +0,0 @@
FROM alpine
RUN echo "Hello World"

View File

@ -2,7 +2,7 @@
##
![Alpine 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`

View File

@ -2,7 +2,7 @@
##
![Busybox - Linux ](_images/busybox-logo.png)
![Busybox - Linux ](./_images/busybox-logo.png)
`BusyBox` Linux `cat``echo``grep``mount``telnet` MB 便Linux
@ -10,30 +10,15 @@
##
`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**

View File

@ -4,53 +4,33 @@
`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 Linux``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 ](_images/fedora-logo.png)
![Fedora ](./_images/fedora-logo.png)
`Fedora` `Fedora Project` `Linux` `Fedora` `Red Hat` `Red Hat Enterprise Linux`
### 使 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`
```bash

View File

@ -1,9 +1,10 @@
# Debian/Ubuntu
`Debian` `Ubuntu` **Debian ** `Docker Hub`
## Debian
![Debian ](_images/debian-logo.png)
![Debian ](./_images/debian-logo.png)
`Debian` `GPL` **Debian Debian Project** **Debian ** `3000` `Software in the Public Interest` `Debian` `Unix` `Debian` `25,000` `12`
@ -13,20 +14,7 @@
### 使 Debian
使 `docker search` `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
@ -38,37 +26,12 @@ Debian GNU/Linux 8
## Ubuntu
![Ubuntu ](_images/ubuntu-logo.jpg)
![Ubuntu ](./_images/ubuntu-logo.jpg)
`Ubuntu` `GNU/Linux` ubuntu`Ubuntu` `Ubuntu` `Debian` `GNOME/Unity` `Debian` 6 2 **Long Term SupportLTS** 3
### 使 Ubuntu
`Ubuntu` 使 `--filter=stars=10` `10`
```bash
$ docker search --filter=stars=10 ubuntu
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
ubuntu Ubuntu is a Debian-based Linux operating sys 10539 [OK]
dorowu/ubuntu-desktop-lxde-vnc Docker image to provide HTML5 VNC interface 395 [OK]
rastasheep/ubuntu-sshd Dockerized SSH service, built on top of offi 243 [OK]
consol/ubuntu-xfce-vnc Ubuntu container with "headless" VNC session 210 [OK]
ubuntu-upstart Upstart is an event-based replacement for th 105 [OK]
ansible/ubuntu14.04-ansible Ubuntu 14.04 LTS with ansible 98 [OK]
neurodebian NeuroDebian provides neuroscience research s 64 [OK]
1and1internet/ubuntu-16-nginx-php-phpmyadmin-mysql-5 ubuntu-16-nginx-php-phpmyadmin-mysql-5 50 [OK]
ubuntu-debootstrap debootstrap --variant=minbase --components=m 42 [OK]
nuagebec/ubuntu Simple always updated Ubuntu docker images w 24 [OK]
i386/ubuntu Ubuntu is a Debian-based Linux operating sys 19
1and1internet/ubuntu-16-apache-php-5.6 ubuntu-16-apache-php-5.6 14 [OK]
1and1internet/ubuntu-16-apache-php-7.0 ubuntu-16-apache-php-7.0 13 [OK]
eclipse/ubuntu_jdk8 Ubuntu, JDK8, Maven 3, git, curl, nmap, mc, 12 [OK]
1and1internet/ubuntu-16-nginx-php-phpmyadmin-mariadb-10 ubuntu-16-nginx-php-phpmyadmin-mariadb-10 11 [OK]
```
使
`ubuntu:18.04` 使
使 `-ti` `bash` `ubuntu`

View File

@ -1,6 +1,6 @@
#
![](_images/aliyun-logo.png)
![](./_images/aliyun-logo.png)
[](https://www.aliyun.com?source=5176.11533457&userCode=8lx5zmtu&type=copy) 创立于 2009 年,是中国较早的云计算平台。阿里云致力于提供安全、可靠的计算和数据处理能力。

View File

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

View File

@ -1,6 +1,6 @@
#
![](_images/qcloud-logo.jpg)
![](./_images/qcloud-logo.jpg)
[](https://cloud.tencent.com/act/cps/redirect?redirect=1040&cps_key=3a5255852d5db99dcd5da4c72f05df61&from=console) 在架构方面经过多年积累,并且有着多年对海量互联网服务的经验。不管是社交、游戏还是其他领域,都有多年的成熟产品来提供产品服务。腾讯在云端完成重要部署,为开发者及企业提供云服务、云数据、云运营等整体一站式服务方案。

View File

@ -18,10 +18,6 @@ docker-compose [-f=<arg>...] [options] [COMMAND] [ARGS...]
* `-p, --project-name NAME` 使
* `--x-networking` 使 Docker
* `--x-network-driver DRIVER` `bridge`
* `--verbose`
* `-v, --version` 退

View File

@ -3,6 +3,8 @@ services:
db:
image: postgres
environment:
POSTGRES_PASSWORD: 'postgres'
web:
build: .
@ -11,5 +13,3 @@ services:
- .:/code
ports:
- "8000:8000"
links:
- db

View File

@ -35,6 +35,8 @@ services:
db:
image: postgres
environment:
POSTGRES_PASSWORD: 'postgres'
web:
build: .
@ -43,8 +45,6 @@ services:
- .:/code
ports:
- "8000:8000"
links:
- db
```
[`docker-compose.yml` ](compose_file.md)
@ -80,6 +80,7 @@ DATABASES = {
'USER': 'postgres',
'HOST': 'db',
'PORT': 5432,
'PASSWORD': 'postgres',
}
}
```

View File

@ -9,7 +9,7 @@
```bash
$ docker-compose --version
docker-compose version 1.25.5, build 4667896b
docker-compose version 1.27.4, build 40524192
```
Linux 使
@ -21,7 +21,10 @@ Linux 系统请使用以下介绍的方法安装。
Linux 64
```bash
$ sudo curl -L https://github.com/docker/compose/releases/download/1.25.5/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
```
@ -42,7 +45,7 @@ $ sudo pip install -U docker-compose
```bash
Collecting docker-compose
Downloading docker-compose-1.25.5.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
```
@ -50,7 +53,7 @@ Successfully installed docker-compose cached-property requests texttable websock
## bash
```bash
$ curl -L https://raw.githubusercontent.com/docker/compose/1.25.5/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
```
##

View File

@ -45,8 +45,6 @@ services:
- .:/myapp
ports:
- "3000:3000"
links:
- db
```
使 `docker-compose run`

7
compose/v2.md Normal file
View File

@ -0,0 +1,7 @@
# Compose V2
Docker GO [](https://github.com/docker/compose-cli) 了 Docker Compose并将其作为了 docker cli 的子命令,称为 `Compose V2`。你可以参照官方文档安装,然后将熟悉的 `docker-compose` 命令替换为 `docker compose`,即可使用 Docker Compose。
##
* [Compose V2 beta](https://docs.docker.com/compose/cli-command/)

View File

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

View File

@ -24,7 +24,7 @@ root@243c32535da7:/#
## `exec`
### -i -t
### `-i` `-t`
`docker exec` `-i` `-t`

View File

@ -3,7 +3,7 @@
使 `docker container rm`
```bash
$ docker container rm trusting_newton
$ docker container rm trusting_newton
trusting_newton
```

View File

@ -1,6 +1,6 @@
#
`stopped`
`exited`
Docker
@ -37,7 +37,7 @@ bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr
`docker run` Docker
*
* [registry](../repository/README.md)
*
*
* 宿
@ -47,7 +47,7 @@ bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr
##
`docker container start`
`docker container start` `exited`
`ps` `top`

View File

@ -9,7 +9,7 @@
`docker container ls -a`
```bash
docker container ls -a
$ docker container ls -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ba267838cc1b ubuntu:18.04 "/bin/bash" 30 minutes ago Exited (0) About a minute ago trusting_newton
```

View File

@ -1,6 +1,6 @@
# Fedora CoreOS
`CoreOS` Fedora Fedora Atomic Host CoreOS Container Linux
`CoreOS` Fedora Fedora Atomic Host CoreOS Container Linux
`CoreOS` Linux 使 Linux `yum` `apt`

View File

@ -20,7 +20,7 @@ FCOS 使用 rpm-ostree 系统进行事务性升级。无需像 yum 升级那样
###
FCOS **Docker CLI** **podman CLI** **skopeo CLI** 使 **crictl CLI** CRI-O
FCOS **Docker CLI****podman CLI** **skopeo CLI** 使 **crictl CLI** CRI-O
##

View File

@ -1,6 +1,6 @@
# Docker
![](_images/types-of-mounts.png)
![](./_images/types-of-mounts.png)
Docker

View File

@ -1,6 +1,6 @@
#
`数据卷` 使 UFS
`数据卷` 使 UnionFS
* `数据卷`

View File

@ -2,30 +2,31 @@ version: "3"
services:
# $ docker-compose up server => up a serverOnly Support Linux or macOS
server:
image: yeasy/docker_practice:latest
ports:
- 4000:4000
volumes:
- ./:/srv/gitbook-src
command: server
# $ docker-compose up build => build gitbook
build:
gitbook-build:
&gitbook-build
image: yeasy/docker_practice:latest
volumes:
- ./:/srv/gitbook-src
command: build
# $ docker run -it --rm -p 4000:80 dockerpracticesig/docker_practice
offline:
# this image build by travis ci
image: dockerpracticesig/docker_practice
gitbook-server:
<< : *gitbook-build
ports:
- 4000:4000
command: server
# docker run -it --rm -p 4000:80 dockerpracticesig/docker_practice
gitbook-offline:
&gitbook-offline
# this image build by GitHub Action
image: dockerpracticesig/docker_practice:gitbook
ports:
- 4000:80
vuepress-offline:
<< : *gitbook-offline
image: dockerpracticesig/docker_practice:vuepress
# developer test docker image
development:

View File

@ -12,6 +12,10 @@
```bash
$ curl -L https://github.com/etcd-io/etcd/releases/download/v3.4.0/etcd-v3.4.0-linux-amd64.tar.gz -o etcd-v3.4.0-linux-amd64.tar.gz
# 使
$ curl -L https://download.fastgit.org/etcd-io/etcd/releases/download/v3.4.0/etcd-v3.4.0-linux-amd64.tar.gz -o etcd-v3.4.0-linux-amd64.tar.gz
$ tar xzvf etcd-v3.4.0-linux-amd64.tar.gz
$ cd etcd-v3.4.0-linux-amd64
```

View File

@ -1,6 +1,6 @@
# etcd
![](_images/etcd_logo.png)
![](./_images/etcd_logo.png)
`etcd` `CoreOS` 2013 6 `key-value` `Go` `CoreOS` `etcd`

View File

@ -40,7 +40,7 @@ FROM scratch
`scratch`
[`swarm`](https://hub.docker.com/_/swarm/)、[`etcd`](https://quay.io/repository/coreos/etcd)。对于 Linux 下静态编译的程序来说,并不需要有操作系统提供运行时支持,所需的一切库都已经在可执行文件里了,因此直接 `FROM scratch` 会让镜像体积更加小巧。使用 [Go 语言](https://golang.org/) 开发的应用很多会使用这种方式来制作镜像,这也是为什么有人认为 Go 是特别适合容器微服务架构的语言的原因之一。
Linux `FROM scratch` 使 [Go ](https://golang.google.cn/) 开发的应用很多会使用这种方式来制作镜像,这也是有人认为 Go 是特别适合容器微服务架构的语言的原因之一。
## RUN

View File

@ -20,7 +20,7 @@ $ docker run --name webserver -d -p 80:80 nginx
访 Nginx
![](_images/images-mac-example-nginx.png)
![](./_images/images-mac-example-nginx.png)
Docker 使 `docker exec`
@ -37,7 +37,7 @@ exit
![](_images/images-create-nginx-docker.png)
![](./_images/images-create-nginx-docker.png)
`docker diff`

View File

@ -4,7 +4,7 @@ WORKDIR /app
COPY package.json /app/
RUN npm i --registry=https://registry.npm.taobao.org \
RUN npm i --registry=https://registry.npmmirror.com \
&& rm -rf ~/.npm
COPY src /app/src

View File

@ -8,7 +8,7 @@ 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
npm i --registry=https://registry.npmmirror.com
COPY src /app/src

View File

@ -1,4 +1,4 @@
FROM golang:1.9-alpine as builder
FROM golang:alpine as builder
RUN apk --no-cache add git

View File

@ -1,4 +1,4 @@
FROM golang:1.9-alpine
FROM golang:alpine
RUN apk --no-cache add git

View File

@ -1,4 +1,4 @@
FROM golang:1.9-alpine
FROM golang:alpine
RUN apk --no-cache add git ca-certificates

View File

@ -1,4 +1,4 @@
### ADD
# ADD
`ADD` `COPY` `COPY`

View File

@ -1,4 +1,4 @@
### ARG
# ARG
`ARG <参数名>[=<默认值>]`
@ -6,7 +6,7 @@
`Dockerfile` `ARG` `docker build` `--build-arg <参数名>=<值>`
1.13 `--build-arg` `Dockerfile` `ARG` `--build-arg` `Dockerfile` 使使退 1.13 退使 CI `Dockerfile` Dockerfile
使 `ARG` Dockerfile
ARG `FROM` `FROM`

View File

@ -1,4 +1,4 @@
### CMD
# CMD
`CMD` `RUN`
@ -40,7 +40,7 @@ CMD service nginx start
退退西
使 `service nginx start` upstart `nginx` `CMD service nginx start` `CMD [ "sh", "-c", "service nginx start"]` `sh` `service nginx start` `sh` `sh` 退退
使 `service nginx start` init nginx `CMD service nginx start` `CMD [ "sh", "-c", "service nginx start"]` `sh` `service nginx start` `sh` `sh` 退退
`nginx`

View File

@ -1,4 +1,4 @@
### COPY
# COPY

View File

@ -1,4 +1,4 @@
### ENTRYPOINT
# ENTRYPOINT
`ENTRYPOINT` `RUN` `exec` `shell`

View File

@ -1,4 +1,4 @@
### ENV
# ENV

View File

@ -1,7 +1,7 @@
### EXPOSE
# EXPOSE
`EXPOSE <端口1> [<端口2>...]`
`EXPOSE` Dockerfile 使便使 `docker run -P` `EXPOSE`
`EXPOSE` Dockerfile 使便使 `docker run -P` `EXPOSE`
`EXPOSE` 使 `-p <宿主端口>:<容器端口>` `-p`宿访 `EXPOSE` 使宿

View File

@ -1,4 +1,4 @@
### HEALTHCHECK
# HEALTHCHECK

View File

@ -1,4 +1,4 @@
### ONBUILD
# ONBUILD
`ONBUILD <其它指令>`

View File

@ -1,6 +1,6 @@
###
#
* `Dockerfie` https://docs.docker.com/engine/reference/builder/
* `Dockerfile` https://docs.docker.com/engine/reference/builder/
* `Dockerfile` https://docs.docker.com/develop/develop-images/dockerfile_best-practices/

View File

@ -1,10 +1,10 @@
### USER
# USER
`USER <用户名>[:<用户组>]`
`USER` `WORKDIR` `WORKDIR` `USER` `RUN`, `CMD` `ENTRYPOINT`
`WORKDIR` `USER`
`USER`
```docker
RUN groupadd -r redis && useradd -r -g redis redis

View File

@ -1,4 +1,4 @@
### VOLUME
# VOLUME
@ -11,10 +11,10 @@
VOLUME /data
```
`/data` `/data`
`/data` `/data`
```bash
docker run -d -v mydata:/data xxxx
$ docker run -d -v mydata:/data xxxx
```
使 `mydata` `/data` `Dockerfile`

View File

@ -1,4 +1,4 @@
### WORKDIR
# WORKDIR
`WORKDIR <工作目录路径>`
@ -33,4 +33,4 @@ WORKDIR c
RUN pwd
```
`pwd` `/a/b/c`
`RUN pwd` `/a/b/c`

View File

@ -9,21 +9,21 @@ redis latest 5f515359c7f8 5 days ago
nginx latest 05a60462f8ba 5 days ago 181 MB
mongo 3.2 fe9198c04d62 5 days ago 342 MB
<none> <none> 00285df0df87 5 days ago 342 MB
ubuntu 18.04 f753707788c5 4 weeks ago 127 MB
ubuntu latest f753707788c5 4 weeks ago 127 MB
ubuntu 18.04 329ed837d508 3 days ago 63.3MB
ubuntu bionic 329ed837d508 3 days ago 63.3MB
```
`仓库名``标签``镜像 ID``创建时间` `所占用的空间`
** ID** **** `ubuntu:18.04` `ubuntu:latest` ID
** ID** **** `ubuntu:18.04` `ubuntu:bionic` ID
##
Docker Hub `ubuntu:18.04` `127 MB` [Docker Hub](https://hub.docker.com/_/ubuntu?tab=tags) 显示的却是 `50 MB`。这是因为 Docker Hub 中显示的体积是压缩后的体积。在镜像下载和上传过程中镜像是保持着压缩状态的,因此 Docker Hub 所显示的大小是网络传输中更关心的流量大小。而 `docker image ls` 显示的是镜像下载到本地后,展开的大小,准确说,是展开后的各层所占空间的总和,因为镜像到本地后,查看空间的时候,更关心的是本地磁盘空间占用的大小。
Docker Hub `ubuntu:18.04` `63.3MB` [Docker Hub](https://hub.docker.com/layers/ubuntu/library/ubuntu/bionic/images/sha256-32776cc92b5810ce72e77aca1d949de1f348e1d281d3f00ebcc22a3adcdc9f42?context=explore) 显示的却是 `25.47 MB`。这是因为 Docker Hub 中显示的体积是压缩后的体积。在镜像下载和上传过程中镜像是保持着压缩状态的,因此 Docker Hub 所显示的大小是网络传输中更关心的流量大小。而 `docker image ls` 显示的是镜像下载到本地后,展开的大小,准确说,是展开后的各层所占空间的总和,因为镜像到本地后,查看空间的时候,更关心的是本地磁盘空间占用的大小。
`docker image ls` Docker 使 Docker 使 Union FS
便
`docker system df` 便
```bash
$ docker system df
@ -76,8 +76,8 @@ $ docker image ls -a
```bash
$ docker image ls ubuntu
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu 18.04 f753707788c5 4 weeks ago 127 MB
ubuntu latest f753707788c5 4 weeks ago 127 MB
ubuntu 18.04 329ed837d508 3 days ago 63.3MB
ubuntu bionic 329ed837d508 3 days ago 63.3MB
```
@ -85,7 +85,7 @@ ubuntu latest f753707788c5 4 weeks ago
```bash
$ docker image ls ubuntu:18.04
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu 18.04 f753707788c5 4 weeks ago 127 MB
ubuntu 18.04 329ed837d508 3 days ago 63.3MB
```
`docker image ls` `--filter` `-f`使 `mongo:3.2`
@ -116,9 +116,8 @@ $ docker image ls -q
05a60462f8ba
fe9198c04d62
00285df0df87
f753707788c5
f753707788c5
1e0c3dd64ccd
329ed837d508
329ed837d508
```
`--filter` `-q` ID `docker` Docker 使
@ -133,9 +132,8 @@ $ docker image ls --format "{{.ID}}: {{.Repository}}"
05a60462f8ba: nginx
fe9198c04d62: mongo
00285df0df87: <none>
f753707788c5: ubuntu
f753707788c5: ubuntu
1e0c3dd64ccd: ubuntu
329ed837d508: ubuntu
329ed837d508: ubuntu
```
@ -147,6 +145,6 @@ IMAGE ID REPOSITORY TAG
05a60462f8ba nginx latest
fe9198c04d62 mongo 3.2
00285df0df87 <none> <none>
f753707788c5 ubuntu 18.04
f753707788c5 ubuntu latest
329ed837d508 ubuntu 18.04
329ed837d508 ubuntu bionic
```

View File

@ -24,18 +24,16 @@ $ docker run -it --rm username/test
Docker
`Linux x86_64` `Linux arm64v8` `$ docker run golang:alpine go version`
`Linux x86_64` `Linux arm64v8` 使 `golang:alpine` `$ docker run golang:alpine go version`
`golang:alpine` [`manifest` ](https://docs.docker.com/registry/spec/manifest-v2-2/)。
`golang:alpine` [`manifest` (`manifest list`)](https://docs.docker.com/registry/spec/manifest-v2-2/)。
Docker `manifest` Docker Docker `golang:alpine` `username/test`
使 `$ docker manifest inspect golang:alpine` `manifest`
> [](../install/experimental)
```bash
$ docker manifest inspect golang:alpine
```
@ -122,7 +120,7 @@ $ docker manifest create username/test \
username/arm64v8-test
```
`manifest` `-a,--amend`
`manifest` `-a` `--amend`
## `manifest`

View File

@ -27,7 +27,7 @@ func main(){
`Dockerfile.one`
```docker
FROM golang:1.9-alpine
FROM golang:alpine
RUN apk --no-cache add git ca-certificates
@ -57,7 +57,7 @@ $ docker build -t go/helloworld:1 -f Dockerfile.one .
`Dockerfile.build`
```docker
FROM golang:1.9-alpine
FROM golang:alpine
RUN apk --no-cache add git
@ -126,7 +126,7 @@ go/helloworld 1 f55d3e16affc 2 minutes ago 295MB
`Dockerfile`
```docker
FROM golang:1.9-alpine as builder
FROM golang:alpine as builder
RUN apk --no-cache add git
@ -173,7 +173,7 @@ go/helloworld 1 f55d3e16affc 2 minutes ago 295MB
使 `as`
```docker
FROM golang:1.9-alpine as builder
FROM golang:alpine as builder
```
`builder` `--target=builder`

View File

@ -5,7 +5,7 @@ COPY package.json /app/
RUN set -x ; cd /app \
&& npm install --registry=https://registry.npm.taobao.org
COPY webpack.mix.js /app/
COPY webpack.mix.js webpack.config.js tailwind.config.js /app/
COPY resources/ /app/resources/
RUN set -x ; cd /app \

View File

@ -61,9 +61,9 @@ FROM node:alpine as frontend
COPY package.json /app/
RUN set -x ; cd /app \
&& npm install --registry=https://registry.npm.taobao.org
&& npm install --registry=https://registry.npmmirror.com
COPY webpack.mix.js /app/
COPY webpack.mix.js webpack.config.js tailwind.config.js /app/
COPY resources/ /app/resources/
RUN set -x ; cd /app \
@ -179,9 +179,9 @@ FROM node:alpine as frontend
COPY package.json /app/
RUN set -x ; cd /app \
&& npm install --registry=https://registry.npm.taobao.org
&& npm install --registry=https://registry.npmmirror.com
COPY webpack.mix.js /app/
COPY webpack.mix.js webpack.config.js tailwind.config.js /app/
COPY resources/ /app/resources/
RUN set -x ; cd /app \

View File

@ -5,12 +5,12 @@
Docker `docker pull`
```bash
docker pull [] [Docker Registry [:]/][:]
$ docker pull [] [Docker Registry [:]/][:]
```
`docker pull --help`
* Docker `<域名/IP>[:端口号]` Docker Hub(docker.io)
* Docker `<域名/IP>[:端口号]` Docker Hub(`docker.io`)
* `<用户名>/<软件名>` Docker Hub `library`
@ -18,16 +18,15 @@ docker pull [选项] [Docker Registry 地址[:端口号]/]仓库名[:标签]
```bash
$ docker pull ubuntu:18.04
18.04: Pulling from library/ubuntu
bf5d46315322: Pull complete
9f13e0ac480c: Pull complete
e8988b5b3097: Pull complete
40af181810e7: Pull complete
e6f7c7e5c03e: Pull complete
Digest: sha256:147913621d9cdea08853f6ba9116c2e27a3ceffecf3b492983ae97c3d643fbbe
92dc2a97ff99: Pull complete
be13a9d27eb8: Pull complete
c8299583700a: Pull complete
Digest: sha256:4bc3ae6596938cb0d9e5ac51a1152ec9dcac2a1c50829c74abd9c4361e321b26
Status: Downloaded newer image for ubuntu:18.04
docker.io/library/ubuntu:18.04
```
Docker Docker Hub `ubuntu:18.04` `library/ubuntu` `18.04`
Docker Docker Hub `docker.io` `ubuntu:18.04` `library/ubuntu` `18.04` `docker pull` `docker.io/library/ubuntu:18.04`
ID 12 `sha256`

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 KiB

View File

@ -6,7 +6,7 @@
###
Docker 64 CentOS 7 3.10 CentOS 7 `overlay2` 使
Docker 64 CentOS 7/8 3.10 CentOS 7 `overlay2` 使
###
@ -40,9 +40,9 @@ $ sudo yum install -y yum-utils
```bash
$ sudo yum-config-manager \
--add-repo \
https://mirrors.ustc.edu.cn/docker-ce/linux/centos/docker-ce.repo
https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
$ sudo sed -i 's/download.docker.com/mirrors.ustc.edu.cn\/docker-ce/g' /etc/yum.repos.d/docker-ce.repo
$ sudo sed -i 's/download.docker.com/mirrors.aliyun.com\/docker-ce/g' /etc/yum.repos.d/docker-ce.repo
#
# $ sudo yum-config-manager \
@ -50,7 +50,7 @@ $ sudo sed -i 's/download.docker.com/mirrors.ustc.edu.cn\/docker-ce/g' /etc/yum.
# https://download.docker.com/linux/centos/docker-ce.repo
```
Docker 使
Docker
```bash
$ sudo yum-config-manager --enable docker-ce-test
@ -64,11 +64,33 @@ $ sudo yum-config-manager --enable docker-ce-test
$ sudo yum install docker-ce docker-ce-cli containerd.io
```
## CentOS8
CentOS8 使 `nftables` Docker `nftables` 使使 `iptables`
`/etc/firewalld/firewalld.conf`
```bash
# FirewallBackend=nftables
FirewallBackend=iptables
```
```bash
$ firewall-cmd --permanent --zone=trusted --add-interface=docker0
$ firewall-cmd --reload
```
## 使
Docker 便CentOS 使 `--mirror` 使
> Docker, test.docker.com
```bash
# $ curl -fsSL test.docker.com -o get-docker.sh
$ curl -fsSL get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh --mirror Aliyun
# $ sudo sh get-docker.sh --mirror AzureChinaCloud
@ -104,12 +126,12 @@ $ sudo usermod -aG docker $USER
## Docker
```bash
$ docker run hello-world
$ docker run --rm hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
d1725b59e92d: Pull complete
Digest: sha256:0add3ace90ecb4adbf7777e9aacf18357296e799f81cabc9fde470971e499788
b8dfde127a29: Pull complete
Digest: sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
@ -167,3 +189,5 @@ $ sudo sysctl -p
##
* [Docker CentOS ](https://docs.docker.com/install/linux/docker-ce/centos/)。
* https://firewalld.org/2018/07/nftables-backend
* https://github.com/moby/libnetwork/issues/2496

View File

@ -1,29 +0,0 @@
# CentOS8 Docker
Docker [][docker-docker] CentOS8使 Moby AkihiroSuda https://github.com/AkihiroSuda/moby-snapshot
[docker-docker]:https://download.docker.com/linux/centos/
##
CentOS8 使 `nftables` Docker `nftables` 使使 `iptables`
`/etc/firewalld/firewalld.conf`
```bash
# FirewallBackend=nftables
FirewallBackend=iptables
```
```bash
$ firewall-cmd --permanent --zone=trusted --add-interface=docker0
$ firewall-cmd --reload
```
##
* https://firewalld.org/2018/07/nftables-backend
* https://github.com/moby/libnetwork/issues/2496

View File

@ -8,8 +8,8 @@
Docker [Debian](https://www.debian.org/intro/about) 操作系统:
* Buster 10
* Stretch 9
* Debian Bullseye 11
* Debian Buster 10
###
@ -32,9 +32,8 @@ $ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
lsb-release \
software-properties-common
gnupg \
lsb-release
```
使
@ -42,26 +41,28 @@ $ sudo apt-get install \
GPG
```bash
$ curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/debian/gpg | sudo apt-key add -
$ curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
#
# $ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
# $ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
```
`sources.list` Docker
> Debian Linux `$(lsb_release -cs)` Debian [Kail Linux](https://www.kali.org/docs/policy/kali-linux-relationship-with-debian/)、 [BunsenLabs Linux](https://www.bunsenlabs.org/)。在这些发行版中我们需要将下面命令中的 `$(lsb_release -cs)` 替换为 https://mirrors.aliyun.com/docker-ce/linux/debian/dists/ 中支持的 Debian 版本代号,例如 `buster`。
```bash
$ sudo add-apt-repository \
"deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/debian \
$(lsb_release -cs) \
stable"
$ echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://mirrors.aliyun.com/docker-ce/linux/debian \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
#
# $ sudo add-apt-repository \
# "deb [arch=amd64] https://download.docker.com/linux/debian \
# $(lsb_release -cs) \
# stable"
# $ echo \
# "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
# $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
```
> Docker APT Docker stable test
@ -80,7 +81,10 @@ $ sudo apt-get install docker-ce docker-ce-cli containerd.io
Docker 便Debian 使 `--mirror` 使
> Docker, test.docker.com
```bash
# $ curl -fsSL test.docker.com -o get-docker.sh
$ curl -fsSL get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh --mirror Aliyun
# $ sudo sh get-docker.sh --mirror AzureChinaCloud
@ -116,12 +120,12 @@ $ sudo usermod -aG docker $USER
## Docker
```bash
$ docker run hello-world
$ docker run --rm hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
d1725b59e92d: Pull complete
Digest: sha256:0add3ace90ecb4adbf7777e9aacf18357296e799f81cabc9fde470971e499788
b8dfde127a29: Pull complete
Digest: sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24
Status: Downloaded newer image for hello-world:latest
Hello from Docker!

View File

@ -2,35 +2,11 @@
docker **** 使
## Docker CLI
## Docker CLI
`~/.docker/config.json`
`v20.10` Docker CLI
```json
{
"experimental": "enabled"
}
```
**Linux/macOS**
```bash
$ export DOCKER_CLI_EXPERIMENTAL=enabled
```
**Windows**
```powershell
#
$ set $env:DOCKER_CLI_EXPERIMENTAL="enabled"
#
$ [environment]::SetEnvironmentvariable("DOCKER_CLI_EXPERIMENTAL","enabled","User")
```
## Dockerd
## dockerd
`/etc/docker/daemon.json`

View File

@ -8,8 +8,8 @@
Docker [Fedora](https://getfedora.org/) 操作系统:
* 30
* 31
* 33
* 34
###
@ -43,9 +43,9 @@ $ sudo dnf -y install dnf-plugins-core
```bash
$ sudo dnf config-manager \
--add-repo \
https://mirrors.ustc.edu.cn/docker-ce/linux/fedora/docker-ce.repo
https://mirrors.aliyun.com/docker-ce/linux/fedora/docker-ce.repo
$ sudo sed -i 's/download.docker.com/mirrors.ustc.edu.cn\/docker-ce/g' /etc/yum.repos.d/docker-ce.repo
$ sudo sed -i 's/download.docker.com/mirrors.aliyun.com\/docker-ce/g' /etc/yum.repos.d/docker-ce.repo
#
# $ sudo dnf config-manager \
@ -84,17 +84,14 @@ docker-ce.x86_64 18.06.1.ce-3.fc28 docker-ce-stable
$ sudo dnf -y install docker-ce-18.06.1.ce
```
Fedora 31 **Cgroupv2** Docker Cgroupv2 **Cgroupv1** :
```bash
$ sudo grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0"
```
## 使
Docker 便Debian 使 `--mirror` 使
> Docker, test.docker.com
```bash
# $ curl -fsSL test.docker.com -o get-docker.sh
$ curl -fsSL get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh --mirror Aliyun
# $ sudo sh get-docker.sh --mirror AzureChinaCloud
@ -130,12 +127,12 @@ $ sudo usermod -aG docker $USER
## Docker
```bash
$ docker run hello-world
$ docker run --rm hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
d1725b59e92d: Pull complete
Digest: sha256:0add3ace90ecb4adbf7777e9aacf18357296e799f81cabc9fde470971e499788
b8dfde127a29: Pull complete
Digest: sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24
Status: Downloaded newer image for hello-world:latest
Hello from Docker!

View File

@ -2,7 +2,7 @@
##
[Docker Desktop for Mac](https://docs.docker.com/docker-for-mac/) 要求系统最低为 macOS Catalina 10.13
[Docker Desktop for Mac](https://docs.docker.com/docker-for-mac/) 要求系统最低为 macOS 必须是 10.15 或更高版本, Catalina、Big Sur 或者 Monterey建议升级到最新版本的 macOS
##
@ -11,44 +11,38 @@
[Homebrew](https://brew.sh/) 的 [Cask](https://github.com/Homebrew/homebrew-cask) 已经支持 Docker Desktop for Mac因此可以很方便的使用 Homebrew Cask 来进行安装:
```bash
$ brew cask install docker
$ brew install --cask docker
```
###
[Stable](https://download.docker.com/mac/stable/Docker.dmg) 或 [Edge](https://download.docker.com/mac/edge/Docker.dmg) 版本的 Docker Desktop for Mac。
[](https://desktop.docker.com/mac/main/amd64/Docker.dmg) 下载 Docker Desktop for Mac。
> M1 `arm64` [](https://desktop.docker.com/mac/main/arm64/Docker.dmg) 下载 Docker Desktop for Mac。你可以在 [官方文档](https://docs.docker.com/docker-for-mac/apple-silicon/) 查阅已知的问题。
macOS `.dmg` [Moby](https://www.docker.com/blog/call-me-moby-dock/) 的鲸鱼图标拖拽到 `Application` 文件夹即可(其间需要输入用户密码)。
![](_images/install-mac-dmg.png)
![](./_images/install-mac-dmg.png)
##
Docker
![](_images/install-mac-apps.png)
![](./_images/install-mac-apps.png)
Docker
![](_images/install-mac-menubar.png)
![](./_images/install-mac-menubar.png)
"Got it!"
![](_images/install-mac-success.png)
![](./_images/install-mac-menu.png)
![](_images/install-mac-menu.png)
Docker
Docker
```bash
$ docker --version
Docker version 19.03.8, build afacb8b
$ docker-compose --version
docker-compose version 1.25.5, build 8a1c60f6
$ docker-machine --version
docker-machine version 0.16.1, build cce350d7
Docker version 20.10.0, build 7287ab3
```
`docker version``docker info` [Nginx ](https://hub.docker.com/_/nginx/)
@ -59,7 +53,7 @@ $ docker run -d -p 80:80 --name webserver nginx
访 <http://localhost>,如果看到了 "Welcome to nginx!",就说明 Docker Desktop for Mac 安装成功了。
![](_images/install-mac-example-nginx.png)
![](./_images/install-mac-example-nginx.png)
Nginx

View File

@ -2,7 +2,7 @@
Docker Hub
* [( -> () -> -> -> )](https://www.aliyun.com/product/acr?source=5176.11533457&userCode=8lx5zmtu)
* [( -> () -> -> -> )](https://cr.console.aliyun.com/cn-hangzhou/instances)
* [ `https://hub-mirror.c.163.com`](https://www.163yun.com/help/documents/56918246390157312)
* [ `https://mirror.baidubce.com`](https://cloud.baidu.com/doc/CCE/s/Yjxppt74z#%E4%BD%BF%E7%94%A8dockerhub%E5%8A%A0%E9%80%9F%E5%99%A8)
@ -59,7 +59,7 @@ $ sudo systemctl restart docker
## macOS
使 macOS Docker Desktop -> `Perferences` `Docker Engine` json `Apply & Restart` Docker
使 macOS Docker Desktop -> `Settings...` `Docker Engine` json `Apply & restart` Docker
```json
{

View File

@ -32,7 +32,7 @@ sudo yum list docker-ce --showduplicates|sort -r
Loading mirror speeds from cached hostfile
Loaded plugins: fastestmirror
docker-ce.x86_64 3:19.03.8-3.el7 docker-ce-stable
docker-ce.x86_64 24.0.4-1.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.7-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.6-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.5-3.el7 docker-ce-stable
@ -46,7 +46,7 @@ docker-ce.x86_64 3:19.03.1-3.el7 docker-ce-stable
#### (A)
```bash
sudo yum install --downloadonly --downloaddir=/tmp/docker-19.03 docker-ce-19.03.8-3.el7 docker-ce-cli-19.03.8-3.el7
sudo yum install --downloadonly --downloaddir=/tmp/docker24_offline_install/ docker-ce-24.0.4-1.el7 docker-ce-cli-24.0.4-1.el7
```
```bash
@ -56,11 +56,11 @@ Dependencies Resolved
Package Arch Version Repository Size
====================================================================================================================================================================================
Installing:
docker-ce x86_64 3:19.03.8-3.el7 docker 25 M
docker-ce x86_64 24.0.4-1.el7 docker 25 M
Installing for dependencies:
container-selinux noarch 2:2.107-3.el7 extras 39 k
containerd.io x86_64 1.2.13-3.1.el7 docker 23 M
docker-ce-cli x86_64 1:19.03.8-3.el7 docker 40 M
container-selinux noarch 24.0.4-1.el7 extras 39 k
containerd.io x86_64 24.0.4-1.el7 docker 23 M
docker-ce-cli x86_64 24.0.4-1.el7 docker 40 M
Transaction Summary
====================================================================================================================================================================================
@ -69,18 +69,19 @@ Install 1 Package (+3 Dependent packages)
Total download size: 87 M
Installed size: 363 M
Background downloading packages, then exiting:
(1/4): container-selinux-2.107-3.el7.noarch.rpm | 39 kB 00:00:00
(2/4): containerd.io-1.2.13-3.1.el7.x86_64.rpm | 23 MB 00:00:00
(3/4): docker-ce-19.03.8-3.el7.x86_64.rpm | 25 MB 00:00:00
(4/4): docker-ce-cli-19.03.8-3.el7.x86_64.rpm | 40 MB 00:00:00
(1/4): container-selinux-24.0.4-1.el7.noarch.rpm | 39 kB 00:00:00
(2/4): containerd.io-24.0.4-1.el7.x86_64.rpm | 23 MB 00:00:00
(3/4): docker-ce-24.0.4-1.el7.x86_64.rpm | 25 MB 00:00:00
(4/4): docker-ce-cli-24.0.4-1.el7.x86_64.rpm | 40 MB 00:00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 118 MB/s | 87 MB 00:00:00
exiting because "Download Only" specified
```
#### (C-N)
* 线使rpm
```bash
yum install *.rpm
rpm -Uvh *.rpm --nodeps --force
```
#### (C-N)
@ -105,7 +106,7 @@ sudo yum versionlock list
```bash
Loaded plugins: fastestmirror, versionlock
3:docker-ce-18.09.9-3.el7.*
3:docker-ce-24.0.4-1.el7.*
versionlock list done
```
@ -116,7 +117,7 @@ sudo yum install docker-ce
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
Excluding 1 update due to versionlock (use "yum versionlock status" to show it)
Package 3:docker-ce-18.09.9-3.el7.x86_64 already installed and latest version
Package 3:docker-ce-24.0.4-1.el7.x86_64 already installed and latest version
Nothing to do
```
@ -128,7 +129,7 @@ sudo yum versionlock delete docker-ce
```bash
Loaded plugins: fastestmirror, versionlock
Deleting versionlock for: 3:docker-ce-18.09.9-3.el7.*
Deleting versionlock for: 3:docker-ce-24.0.4-1.el7.*
versionlock deleted: 1
```
@ -246,4 +247,3 @@ sudo systemctl enable docker
```

View File

@ -6,9 +6,11 @@
Docker `x86_64` `ARM` `ARM` Docker
Docker [Raspberry Pi OS](https://www.raspberrypi.org/downloads/raspberry-pi-os/) 操作系统:
Docker [Raspberry Pi OS](https://www.raspberrypi.org/software/operating-systems/) 操作系统:
* Raspberry Pi OS Buster
* Raspberry Pi OS Bullseye
* Raspberry Pi OS Bookworm
** `Raspberry Pi OS` [](https://www.raspberrypi.org/) 官方支持,并推荐用作树莓派的首选系统,其基于 `Debian`。
@ -33,7 +35,7 @@ $ sudo apt-get install \
GPG
```bash
$ curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/raspbian/gpg | sudo apt-key add -
$ curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/raspbian/gpg | sudo apt-key add -
#
@ -44,7 +46,7 @@ $ curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/raspbian/gpg | sudo apt
```bash
$ sudo add-apt-repository \
"deb [arch=armhf] https://mirrors.ustc.edu.cn/docker-ce/linux/raspbian \
"deb [arch=armhf] https://mirrors.aliyun.com/docker-ce/linux/raspbian \
$(lsb_release -cs) \
stable"
@ -58,6 +60,33 @@ $ sudo add-apt-repository \
> Docker APT Docker stable test
####
`Raspberry Pi OS Bullseye/Bookworm` Docker :
```bash
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 95, in <module>
sp = SoftwareProperties(options=options)
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
self.reload_sourceslist()
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
self.distro.get_sources(self.sourceslist)
File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 91, in get_sources
raise NoDistroTemplateException(
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/bullseye
```
`/etc/apt/sources.list` :
```bash
$ sudo echo "deb [arch=armhf] https://mirrors.aliyun.com/docker-ce/linux/raspbian $(lsb_release -cs) stable" | sudo tee -a /etc/apt/sources.list
#
# $ sudo echo "deb [arch=armhf] https://download.docker.com/linux/raspbian $(lsb_release -cs) stable" | sudo tee -a /etc/apt/sources.list
```
### Docker
apt `docker-ce`
@ -72,7 +101,10 @@ $ sudo apt-get install docker-ce
Docker 便Raspberry Pi OS 使 `--mirror` 使
> Docker, test.docker.com
```bash
# $ curl -fsSL test.docker.com -o get-docker.sh
$ curl -fsSL get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh --mirror Aliyun
# $ sudo sh get-docker.sh --mirror AzureChinaCloud
@ -108,12 +140,12 @@ $ sudo usermod -aG docker $USER
## Docker
```bash
$ docker run arm32v7/hello-world
$ docker run --rm hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
d1725b59e92d: Pull complete
Digest: sha256:0add3ace90ecb4adbf7777e9aacf18357296e799f81cabc9fde470971e499788
4ee5c797bcd7: Pull complete
Digest: sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
@ -122,7 +154,7 @@ This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
(arm32v7)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it

View File

@ -8,9 +8,10 @@
Docker [Ubuntu](https://ubuntu.com/server) 操作系统:
* Ubuntu Hirsute 21.04
* Ubuntu Groovy 20.10
* Ubuntu Focal 20.04 (LTS)
* Bionic 18.04 (LTS)
* Xenial 16.04 (LTS)
* Ubuntu Bionic 18.04 (LTS)
Docker 64 x86 ARM Ubuntu LTSLong-Term-Support 5 使 LTS
@ -35,8 +36,8 @@ $ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
gnupg \
lsb-release
```
使
@ -44,27 +45,25 @@ $ sudo apt-get install \
`GPG`
```bash
$ curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
$ curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
#
# $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
```
`sources.list` Docker
```bash
$ sudo add-apt-repository \
"deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu \
$(lsb_release -cs) \
stable"
$ echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://mirrors.aliyun.com/docker-ce/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
#
# $ sudo add-apt-repository \
# "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
# $(lsb_release -cs) \
# stable"
# $ echo \
# "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
# $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
```
> Docker APT Docker stable test
@ -83,7 +82,10 @@ $ sudo apt-get install docker-ce docker-ce-cli containerd.io
Docker 便Ubuntu 使 `--mirror` 使
> Docker, test.docker.com
```bash
# $ curl -fsSL test.docker.com -o get-docker.sh
$ curl -fsSL get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh --mirror Aliyun
# $ sudo sh get-docker.sh --mirror AzureChinaCloud
@ -119,12 +121,12 @@ $ sudo usermod -aG docker $USER
## Docker
```bash
$ docker run hello-world
$ docker run --rm hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
d1725b59e92d: Pull complete
Digest: sha256:0add3ace90ecb4adbf7777e9aacf18357296e799f81cabc9fde470971e499788
b8dfde127a29: Pull complete
Digest: sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24
Status: Downloaded newer image for hello-world:latest
Hello from Docker!

View File

@ -8,33 +8,33 @@
****
[Stable](https://download.docker.com/win/stable/Docker%20Desktop%20Installer.exe) 或 [Edge](https://download.docker.com/win/edge/Docker%20Desktop%20Installer.exe) 版本的 Docker Desktop for Windows。
[](https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe) 下载 Docker Desktop for Windows。
`Docker Desktop Installer.exe`
**使 [winget](https://docs.microsoft.com/zh-cn/windows/package-manager/) 安装**
```powershell
# stable
$ winget install Docker.DockerDesktop
# edge
$ winget install Docker.DockerDesktopEdge
```
## WSL2 Docker
Windows Windows 10 v1903 使 WSL2 Docker [Docker Desktop WSL 2 backend](https://docs.docker.com/docker-for-windows/wsl/)。
##
Windows **Docker** **Docker Desktop**
![](_images/install-win-docker-app-search.png)
![](./_images/install-win-docker-app-search.png)
Docker Windows
![](_images/install-win-taskbar-circle.png)
![](./_images/install-win-taskbar-circle.png)
Got it 使 Docker
Docker PowerShell 使 Docker
![](_images/install-win-success-popup-cloud.png)
> 使 [Windows Terminal](https://docs.microsoft.com/zh-cn/windows/terminal/get-started) 在终端使用 Docker。
##
@ -43,5 +43,4 @@ Docker 启动之后会在 Windows 任务栏出现鲸鱼图标。
##
* [](https://docs.docker.com/docker-for-windows/install/)
* [Docker Desktop WSL 2 backend](https://docs.docker.com/docker-for-windows/wsl/)
* [WSL 2 Support is coming to Windows 10 Versions 1903 and 1909](https://devblogs.microsoft.com/commandline/wsl-2-support-is-coming-to-windows-10-versions-1903-and-1909/)

View File

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

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