Update title style

Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
pull/432/head
Kang HuaiShuai 2019-11-05 23:35:43 +08:00
parent 3ba7560b4d
commit 709c77adcb
No known key found for this signature in database
GPG Key ID: 0A380828B1C243A7
39 changed files with 297 additions and 316 deletions

View File

@ -37,6 +37,10 @@ module.exports = {
text: 'Kubernetes',
link: '/kubernetes/',
},
{
text: "云计算",
link: "/cloud/",
},
{
text: 'GitHub',
link: 'https://github.com/yeasy/docker_practice'
@ -58,6 +62,13 @@ module.exports = {
// }
],
sidebar: {
'/cloud/': [
'intro',
'aws',
'tencentCloud',
'alicloud',
'summary',
],
'/kubernetes/': [
'intro',
'quickstart',
@ -76,7 +87,6 @@ module.exports = {
'wordpress',
],
'/install/': [
'/install/',
'ubuntu',
'debian',
'fedora',
@ -85,9 +95,9 @@ module.exports = {
'mac',
'windows',
'mirror',
'experimental',
],
'/underly/': [
'/underly/',
'arch',
'namespace',
'cgroups',
@ -96,7 +106,6 @@ module.exports = {
'network',
],
'/repository/': [
'/repository/',
'dockerhub',
'registry',
'registry_auth',
@ -107,7 +116,6 @@ module.exports = {
title: "操作系统",
collapsable:false,
children: [
'/cases/os/',
'busybox',
'alpine',
'debian',
@ -119,14 +127,13 @@ module.exports = {
title: "在 IDE 中使用 Docker",
collapsable: false,
children: [
'/ide/',
'/ide/vscode',
'/IDE/',
'/IDE/vsCode',
],
},
],
'/cases/ci/': [
'/cases/ci/',
'/cases/ci/actions/',
'actions/',
{
title: "Drone",
collapsable: false,
@ -145,55 +152,55 @@ module.exports = {
title: "Docker 简介",
collapsable: false,
children: [
'/introduction/',
'/introduction/what',
'/introduction/why',
'introduction/',
'introduction/what',
'introduction/why',
]
},{
title: "基本概念",
collapsable: false,
children: [
'/basic_concept/',
'/basic_concept/image',
'/basic_concept/container',
'/basic_concept/repository'
'basic_concept/',
'basic_concept/image',
'basic_concept/container',
'basic_concept/repository'
]
},
{
title: "使用镜像",
collapsable: false,
children: [
'/image/',
'/image/pull',
'/image/list',
'/image/rm',
'/image/commit',
'/image/build',
'/image/other.md',
'/image/internal.md',
'image/',
'image/pull',
'image/list',
'image/rm',
'image/commit',
'image/build',
'image/other.md',
'image/internal.md',
]
},
{
title: 'Dockerfile',
collapsable: false,
children: [
"/image/dockerfile/",
'/image/dockerfile/copy',
'/image/dockerfile/add',
'/image/dockerfile/cmd',
'/image/dockerfile/entrypoint',
'/image/dockerfile/env',
'/image/dockerfile/arg',
'/image/dockerfile/volume',
'/image/dockerfile/expose',
'/image/dockerfile/workdir',
'/image/dockerfile/user',
'/image/dockerfile/healthcheck',
'/image/dockerfile/onbuild',
'/image/dockerfile/references',
'/image/multistage-builds/',
'/image/multistage-builds/laravel',
'/image/manifest',
"image/dockerfile/",
'image/dockerfile/copy',
'image/dockerfile/add',
'image/dockerfile/cmd',
'image/dockerfile/entrypoint',
'image/dockerfile/env',
'image/dockerfile/arg',
'image/dockerfile/volume',
'image/dockerfile/expose',
'image/dockerfile/workdir',
'image/dockerfile/user',
'image/dockerfile/healthcheck',
'image/dockerfile/onbuild',
'image/dockerfile/references',
'image/multistage-builds/',
'image/multistage-builds/laravel',
'image/manifest',
]
},{
title: "操作容器",
@ -297,18 +304,6 @@ module.exports = {
'coreos/intro_tools',
],
},
{
title: "容器与云计算",
collapsable:false,
children: [
'cloud/',
'cloud/intro',
'cloud/aws',
'cloud/tencentCloud',
'cloud/alicloud',
'cloud/summary',
],
},
{
title: "Docker 开源项目",
collapsable:false,
@ -359,15 +354,23 @@ module.exports = {
title: 'Mesos',
collapsable: false,
children: [
'/mesos/intro',
'/mesos/installation',
'/mesos/architecture',
'/mesos/configuration',
'/mesos/monitor',
'/mesos/framework',
'/mesos/summary',
'mesos/',
'mesos/intro',
'mesos/installation',
'mesos/architecture',
'mesos/configuration',
'mesos/monitor',
'mesos/framework',
'mesos/summary',
]
},
{
title: 'Docker Swarm',
collapsable: false,
children: [
"swarm/"
]
}
],
},
}

View File

@ -1,3 +1,7 @@
#
* Docker Machine
* Mesos
* Docker Swarm

View File

@ -2,19 +2,7 @@
## Buildx
`buildx` 使
Linux/macOS
```bash
$ export DOCKER_CLI_EXPERIMENTAL=enabled
```
Windows
```bash
$ set $env:DOCKER_CLI_EXPERIMENTAL=enabled
```
`buildx` [](../install/experimental.md)
## 使

View File

@ -1,10 +1,10 @@
## Travis CI 使 Docker
# 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 仓库构建。
@ -42,6 +42,6 @@ after_success:
> Travis CI `DOCKER_PASSWORD` `DOCKER_USERNAME`
###
##
GitHub [Travis CI](https://travis-ci.com/) 查看构建详情。

View File

@ -1,6 +1,6 @@
## Alpine
# Alpine
###
##
![Apline Linux ](_images/alpinelinux-logo.png)
@ -22,7 +22,7 @@ ubuntu latest b39b81afc8ca 188.3 MB
centos latest 8efe422e6104 210 MB
```
### 使
## 使
使 `docker run` `Alpine` Linux
@ -31,7 +31,7 @@ $ docker run alpine echo '123'
123
```
### `Alpine`
## `Alpine`
Docker `Alpine`
@ -54,7 +54,7 @@ $ echo "http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositorie
$ apk --update add --no-cache <package>
```
###
##
* `Alpine` https://www.alpinelinux.org/
* `Alpine` https://github.com/alpinelinux

View File

@ -1,6 +1,6 @@
## Busybox
# Busybox
###
##
![Busybox - Linux ](_images/busybox-logo.png)
@ -8,7 +8,7 @@
`BusyBox` `POSIX` `Linux` `Android``Hurd``FreeBSD`
###
##
`Docker Hub` `busybox`
@ -44,7 +44,7 @@ REPOSITORY TAG IMAGE ID CREATED
busybox latest e72ac664f4f0 6 weeks ago 2.433 MB
```
### busybox
## busybox
`busybox` `grep`
@ -105,7 +105,7 @@ tmpfs on /proc/kcore type tmpfs (rw,nosuid,mode=755)
`busybox` `Linux` `Linux`
###
##
* `Busybox` https://busybox.net/
* `Busybox` https://git.busybox.net/busybox/

View File

@ -1,7 +1,7 @@
## Debian/Ubuntu
# Debian/Ubuntu
`Debian` `Ubuntu` **Debian ** `Docker Hub`
### Debian
## Debian
![Debian ](_images/debian-logo.png)
@ -11,7 +11,7 @@
`Linux` `Ubuntu``Knoppix` `Linspire` `Xandros` `Debian GNU/Linux`
#### 使 Debian
### 使 Debian
使 `docker search` `Debian`
@ -36,13 +36,13 @@ Debian GNU/Linux 8
`Debian`
### Ubuntu
## Ubuntu
![Ubuntu ](_images/ubuntu-logo.jpg)
`Ubuntu` `GNU/Linux` ubuntu`Ubuntu` `Ubuntu` `Debian` `GNOME/Unity` `Debian` 6 2 **Long Term SupportLTS** 3
#### 使 Ubuntu
### 使 Ubuntu
`Ubuntu` 使 `--filter=stars=10` `10`
@ -162,7 +162,7 @@ root@7d93de07bf76:/# curl 127.0.0.1
使 `-p` 访
###
##
* `Debian` https://www.debian.org/
* `Neuro Debian` http://neuro.debian.net/

View File

@ -1,4 +1,4 @@
##
#
![](_images/aliyun-logo.png)

View File

@ -1,4 +1,4 @@
##
#
![AWS](_images/aws-logo.jpg)

View File

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

View File

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

View File

@ -1,4 +1,4 @@
##
#
![](_images/qcloud-logo.jpg)

View File

@ -1,6 +1,6 @@
## Compose
# Compose
###
##
Compose
@ -12,7 +12,7 @@
docker-compose [-f=<arg>...] [options] [COMMAND] [ARGS...]
```
###
##
* `-f, --file FILE` 使 Compose `docker-compose.yml`
@ -26,9 +26,9 @@ docker-compose [-f=<arg>...] [options] [COMMAND] [ARGS...]
* `-v, --version` 退
### 使
## 使
#### `build`
### `build`
`docker-compose build [options] [SERVICE...]`
@ -46,27 +46,27 @@ docker-compose [-f=<arg>...] [options] [COMMAND] [ARGS...]
* `--pull` pull
#### `config`
### `config`
Compose
#### `down`
### `down`
`up`
#### `exec`
### `exec`
#### `help`
### `help`
#### `images`
### `images`
Compose
#### `kill`
### `kill`
`docker-compose kill [options] [SERVICE...]`
@ -78,7 +78,7 @@ docker-compose [-f=<arg>...] [options] [COMMAND] [ARGS...]
$ docker-compose kill -s SIGINT
```
#### `logs`
### `logs`
`docker-compose logs [options] [SERVICE...]`
@ -86,13 +86,13 @@ $ docker-compose kill -s SIGINT
#### `pause`
### `pause`
`docker-compose pause [SERVICE...]`
#### `port`
### `port`
`docker-compose port [options] SERVICE PRIVATE_PORT`
@ -104,7 +104,7 @@ $ docker-compose kill -s SIGINT
* `--index=index` 1
#### `ps`
### `ps`
`docker-compose ps [options] [SERVICE...]`
@ -114,7 +114,7 @@ $ docker-compose kill -s SIGINT
* `-q` ID
#### `pull`
### `pull`
`docker-compose pull [options] [SERVICE...]`
@ -124,11 +124,11 @@ $ docker-compose kill -s SIGINT
* `--ignore-pull-failures`
#### `push`
### `push`
Docker
#### `restart`
### `restart`
`docker-compose restart [options] [SERVICE...]`
@ -138,7 +138,7 @@ $ docker-compose kill -s SIGINT
* `-t, --timeout TIMEOUT` 10
#### `rm`
### `rm`
`docker-compose rm [options] [SERVICE...]`
@ -150,7 +150,7 @@ $ docker-compose kill -s SIGINT
* `-v`
#### `run`
### `run`
`docker-compose run [options] [-p PORT...] [-e KEY=VAL...] SERVICE [COMMAND] [ARGS...]`
@ -203,7 +203,7 @@ $ docker-compose run --no-deps web python manage.py shell
* `-T` tty tty
#### `scale`
### `scale`
`docker-compose scale [options] [SERVICE=NUM...]`
@ -223,13 +223,13 @@ $ docker-compose scale web=3 db=2
* `-t, --timeout TIMEOUT` 10
#### `start`
### `start`
`docker-compose start [SERVICE...]`
#### `stop`
### `stop`
`docker-compose stop [options] [SERVICE...]`
@ -239,17 +239,17 @@ $ docker-compose scale web=3 db=2
* `-t, --timeout TIMEOUT` 10
#### `top`
### `top`
#### `unpause`
### `unpause`
`docker-compose unpause [SERVICE...]`
#### `up`
### `up`
`docker-compose up [options] [SERVICE...]`
@ -283,12 +283,12 @@ $ docker-compose scale web=3 db=2
* `-t, --timeout TIMEOUT` 10
#### `version`
### `version`
`docker-compose version`
###
##
* [](https://docs.docker.com/compose/reference/overview/)

View File

@ -1,4 +1,4 @@
## Compose
# Compose
使 `Compose` `docker run`
@ -22,7 +22,7 @@ services:
### `build`
## `build`
`Dockerfile` docker-compose.yml `Compose` 使
@ -62,7 +62,7 @@ build:
- corp/web_app:3.14
```
### `cap_add, cap_drop`
## `cap_add, cap_drop`
capacity
@ -80,7 +80,7 @@ cap_drop:
- NET_ADMIN
```
### `command`
## `command`
@ -88,11 +88,11 @@ cap_drop:
command: echo "hello world"
```
### `configs`
## `configs`
`Swarm mode` [`Swarm mode`](../swarm_mode/)
### `cgroup_parent`
## `cgroup_parent`
`cgroup`
@ -102,7 +102,7 @@ command: echo "hello world"
cgroup_parent: cgroups_1
```
### `container_name`
## `container_name`
使 `项目名称_服务名称_序号`
@ -112,11 +112,11 @@ container_name: docker-web-container
>: scale Docker
### `deploy`
## `deploy`
`Swarm mode` [`Swarm mode`](../swarm_mode/)
### `devices`
## `devices`
@ -125,7 +125,7 @@ devices:
- "/dev/ttyUSB1:/dev/ttyUSB0"
```
### `depends_on`
## `depends_on`
`redis` `db` `web`
@ -148,7 +148,7 @@ services:
>`web` `redis` `db`
### `dns`
## `dns`
`DNS`
@ -160,7 +160,7 @@ dns:
- 114.114.114.114
```
### `dns_search`
## `dns_search`
`DNS`
@ -172,7 +172,7 @@ dns_search:
- domain2.example.com
```
### `tmpfs`
## `tmpfs`
tmpfs
@ -183,7 +183,7 @@ tmpfs:
- /tmp
```
### `env_file`
## `env_file`
@ -207,7 +207,7 @@ env_file:
PROG_ENV=development
```
### `environment`
## `environment`
使
@ -229,7 +229,7 @@ environment:
y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF
```
### `expose`
## `expose`
宿访
@ -241,7 +241,7 @@ expose:
- "8000"
```
### `external_links`
## `external_links`
>使
@ -254,7 +254,7 @@ external_links:
- project_db_1:postgresql
```
### `extra_hosts`
## `extra_hosts`
Docker `--add-host` host
@ -271,7 +271,7 @@ extra_hosts:
52.1.157.61 dockerhub
```
### `healthcheck`
## `healthcheck`
@ -283,7 +283,7 @@ healthcheck:
retries: 3
```
### `image`
## `image`
ID`Compose`
@ -293,7 +293,7 @@ image: orchardup/postgresql
image: a4bc65fd
```
### `labels`
## `labels`
Docker metadata
@ -304,11 +304,11 @@ labels:
com.startupteam.release: "rc3 for v1.0"
```
### `links`
## `links`
>使
### `logging`
## `logging`
@ -335,7 +335,7 @@ options:
max-file: "10"
```
### `network_mode`
## `network_mode`
使 `docker run` `--network`
@ -347,7 +347,7 @@ network_mode: "service:[service name]"
network_mode: "container:[container name/id]"
```
### `networks`
## `networks`
@ -365,7 +365,7 @@ networks:
other-network:
```
### `pid`
## `pid`
宿 ID 访
@ -373,7 +373,7 @@ networks:
pid: "host"
```
### `ports`
## `ports`
@ -389,7 +389,7 @@ ports:
*使 `HOST:CONTAINER` 使 60 `YAML` `xx:yy` 60 *
### `secrets`
## `secrets`
`mysql`
@ -412,7 +412,7 @@ secrets:
external: true
```
### `security_opt`
## `security_opt`
label
@ -422,7 +422,7 @@ security_opt:
- label:role:ROLE
```
### `stop_signal`
## `stop_signal`
使 SIGTERM
@ -430,7 +430,7 @@ security_opt:
stop_signal: SIGUSR1
```
### `sysctls`
## `sysctls`
@ -444,7 +444,7 @@ sysctls:
- net.ipv4.tcp_syncookies=0
```
### `ulimits`
## `ulimits`
ulimits
@ -458,7 +458,7 @@ sysctls:
hard: 40000
```
### `volumes`
## `volumes`
宿(`HOST:CONTAINER`)(`VOLUME:CONTAINER`)访 `HOST:CONTAINER:ro`
@ -486,7 +486,7 @@ volumes:
mysql_data:
```
###
##
`domainname, entrypoint, hostname, ipc, mac_address, privileged, read_only, shm_size, restart, stdin_open, tty, user, working_dir` `docker run`
@ -546,7 +546,7 @@ stdin_open: true
tty: true
```
###
##
Compose `.env`
@ -573,6 +573,6 @@ MONGO_VERSION=3.6
`docker-compose up` `mongo:3.6`
###
##
* [](https://docs.docker.com/compose/compose-file/)

View File

@ -1,4 +1,4 @@
## 使 Django
# 使 Django
> `Python`

View File

@ -1,4 +1,4 @@
##
#
`Compose` LinuxmacOSWindows 10
@ -14,7 +14,7 @@ docker-compose version 1.24.1, build 4667896b
Linux 使
###
##
Linux [ GitHub Release](https://github.com/docker/compose/releases) 处直接下载编译好的二进制文件即可。
@ -26,7 +26,7 @@ $ sudo curl -L https://github.com/docker/compose/releases/download/1.24.1/docker
$ sudo chmod +x /usr/local/bin/docker-compose
```
### PIP
## PIP
** `x86_64` Linux `ARM` ()使 `pip`
@ -47,13 +47,13 @@ Collecting docker-compose
Successfully installed docker-compose cached-property requests texttable websocket-client docker-py dockerpty six enum34 backports.ssl-match-hostname ipaddress
```
### bash
## bash
```bash
$ curl -L https://raw.githubusercontent.com/docker/compose/1.24.1/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose
```
###
##

View File

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

View File

@ -1,4 +1,4 @@
## 使 Rails
# 使 Rails
> `Ruby`

View File

@ -1,6 +1,6 @@
## 使
# 使
###
##
@ -10,13 +10,13 @@
`Compose`
###
##
web web
`Python` 访 web
#### web
### web
`app.py`
@ -36,7 +36,7 @@ if __name__ == "__main__":
app.run(host="0.0.0.0", debug=True)
```
#### Dockerfile
### Dockerfile
`Dockerfile`
@ -48,7 +48,7 @@ RUN pip install redis flask
CMD ["python", "app.py"]
```
#### docker-compose.yml
### docker-compose.yml
`docker-compose.yml` Compose 使
@ -65,7 +65,7 @@ services:
image: "redis:alpine"
```
#### compose
### compose
```bash
$ docker-compose up

View File

@ -1,14 +1,14 @@
## 使 WordPress
# 使 WordPress
> `PHP`
`Compose` 便 `Wordpress`
###
##
`wordpress`
### `docker-compose.yml`
## `docker-compose.yml`
[`docker-compose.yml`](https://github.com/yeasy/docker_practice/blob/master/compose/demo/wordpress/docker-compose.yml) 文件将开启一个 `wordpress` 服务和一个独立的 `MySQL` 实例:
@ -46,6 +46,6 @@ volumes:
db_data:
```
###
##
`docker-compose up -d` Compose `wordpress` 访 `127.0.0.1:8000` `WordPress`

View File

@ -34,21 +34,7 @@ $ docker run -it --rm username/test
使 `$ docker manifest inspect golang:alpine` `manifest`
**** 使
```bash
# LinuxmacOS
$ export DOCKER_CLI_EXPERIMENTAL=enabled
# Windows
$ set $env:DOCKER_CLI_EXPERIMENTAL=enabled
```
> 使
> [](../install/experimental)
```bash
$ docker manifest inspect golang:alpine

View File

@ -1,14 +1,14 @@
## CentOS Docker CE
# CentOS Docker CE
> Docker YUM 使 yum Docker.
###
##
####
###
Docker CE 64 CentOS 7 3.10 CentOS 7 `overlay2` 使
####
###
Docker `docker` `docker-engine`使
@ -25,7 +25,7 @@ $ sudo yum remove docker \
docker-engine
```
### 使 yum
## 使 yum
@ -63,7 +63,7 @@ $ sudo yum-config-manager --enable docker-ce-test
$ sudo yum-config-manager --enable docker-ce-nightly
```
#### Docker CE
### Docker CE
`yum` `docker-ce`
@ -72,7 +72,7 @@ $ sudo yum makecache fast
$ sudo yum install docker-ce
```
### 使
## 使
Docker 便CentOS 使 `--mirror` 使
@ -84,14 +84,14 @@ $ sudo sh get-docker.sh --mirror Aliyun
Docker CE (stable)
### Docker CE
## Docker CE
```bash
$ sudo systemctl enable docker
$ sudo systemctl start docker
```
### docker
## docker
`docker` 使 [Unix socket](https://en.wikipedia.org/wiki/Unix_domain_socket) 与 Docker 引擎通讯。而只有 `root` 用户和 `docker` 组的用户才可以访问 Docker 引擎的 Unix socket。出于安全考虑一般 Linux 系统上不会直接使用 `root` 用户。因此,更好地做法是将需要使用 `docker` 的用户加入 `docker` 用户组。
@ -109,7 +109,7 @@ $ sudo usermod -aG docker $USER
退
### Docker
## Docker
```bash
$ docker run hello-world
@ -144,11 +144,11 @@ For more examples and ideas, visit:
###
##
使 Docker Docker [](mirror.md)
###
##
CentOS 使 Docker CE
@ -172,6 +172,6 @@ EOF
$ sudo sysctl -p
```
###
##
* [Docker CentOS ](https://docs.docker.com/install/linux/docker-ce/centos/)。

View File

@ -1,17 +1,17 @@
## Debian Docker CE
# Debian Docker CE
> Docker APT 使 apt Docker.
###
##
####
###
Docker CE [Debian](https://www.debian.org/intro/about) 操作系统:
* Buster 10
* Stretch 9
####
###
Docker `docker` `docker-engine`使
@ -21,7 +21,7 @@ $ sudo apt-get remove docker \
docker.io
```
### 使 APT
## 使 APT
apt 使 HTTPS 使 HTTPS CA
@ -66,7 +66,7 @@ $ sudo add-apt-repository \
> Docker CE APT Docker CE stable test nightly
#### Docker CE
### Docker CE
apt `docker-ce`
@ -76,7 +76,7 @@ $ sudo apt-get update
$ sudo apt-get install docker-ce
```
### 使
## 使
Docker 便Debian 使 `--mirror` 使
@ -88,14 +88,14 @@ $ sudo sh get-docker.sh --mirror Aliyun
Docker CE (stable)
### Docker CE
## Docker CE
```bash
$ sudo systemctl enable docker
$ sudo systemctl start docker
```
### docker
## docker
`docker` 使 [Unix socket](https://en.wikipedia.org/wiki/Unix_domain_socket) 与 Docker 引擎通讯。而只有 `root` 用户和 `docker` 组的用户才可以访问 Docker 引擎的 Unix socket。出于安全考虑一般 Linux 系统上不会直接使用 `root` 用户。因此,更好地做法是将需要使用 `docker` 的用户加入 `docker` 用户组。
@ -113,7 +113,7 @@ $ sudo usermod -aG docker $USER
退
### Docker
## Docker
```bash
$ docker run hello-world
@ -148,10 +148,10 @@ For more examples and ideas, visit:
###
##
使 Docker Docker [](mirror.md)
###
##
* [Docker Debian ](https://docs.docker.com/install/linux/docker-ce/debian/)

View File

@ -1,10 +1,10 @@
## Fedora Docker CE
# Fedora Docker CE
> Docker dnf 使 dnf Docker.
###
##
####
###
Docker CE [Fedora](https://fedoraproject.org/) 操作系统:
@ -12,7 +12,7 @@ Docker CE 支持以下版本的 [Fedora](https://fedoraproject.org/) 操作系
* 29
* 30
####
###
Docker `docker` `docker-engine`使
@ -29,7 +29,7 @@ $ sudo dnf remove docker \
docker-engine
```
### 使 dnf
## 使 dnf
@ -71,7 +71,7 @@ $ sudo dnf config-manager --set-enabled docker-ce-nightly
$ sudo dnf config-manager --set-disabled docker-ce-test
```
#### Docker CE
### Docker CE
`dnf` `docker-ce`
@ -90,7 +90,7 @@ docker-ce.x86_64 18.06.1.ce-3.fc28 docker-ce-stable
$ sudo dnf -y install docker-ce-18.06.1.ce
```
### 使
## 使
Docker 便Debian 使 `--mirror` 使
@ -102,14 +102,14 @@ $ sudo sh get-docker.sh --mirror Aliyun
Docker CE (stable)
### Docker CE
## Docker CE
```bash
$ sudo systemctl enable docker
$ sudo systemctl start docker
```
### docker
## docker
`docker` 使 [Unix socket](https://en.wikipedia.org/wiki/Unix_domain_socket) 与 Docker 引擎通讯。而只有 `root` 用户和 `docker` 组的用户才可以访问 Docker 引擎的 Unix socket。出于安全考虑一般 Linux 系统上不会直接使用 `root` 用户。因此,更好地做法是将需要使用 `docker` 的用户加入 `docker` 用户组。
@ -127,7 +127,7 @@ $ sudo usermod -aG docker $USER
退
### Docker
## Docker
```bash
$ docker run hello-world
@ -162,10 +162,10 @@ For more examples and ideas, visit:
###
##
使 Docker Docker [](mirror.md)
###
##
* [Docker Fedora ](https://docs.docker.com/install/linux/docker-ce/fedora)。

View File

@ -1,12 +1,12 @@
## macOS Docker Desktop CE
# macOS Docker Desktop CE
###
##
[Docker Desktop for Mac](https://docs.docker.com/docker-for-mac/) 要求系统最低为 macOS Sierra 10.12。
###
##
#### 使 Homebrew
### 使 Homebrew
[Homebrew](https://brew.sh/) 的 [Cask](https://caskroom.github.io/) 已经支持 Docker Desktop for Mac因此可以很方便的使用 Homebrew Cask 来进行安装:
@ -14,7 +14,7 @@
$ brew cask install docker
```
####
###
[Stable](https://download.docker.com/mac/stable/Docker.dmg) 或 [Edge](https://download.docker.com/mac/edge/Docker.dmg) 版本的 Docker Desktop for Mac。
@ -22,7 +22,7 @@ $ brew cask install docker
![](_images/install-mac-dmg.png)
###
##
Docker
@ -68,10 +68,10 @@ $ docker stop webserver
$ docker rm webserver
```
###
##
使 Docker Docker [](mirror.md)
###
##
* [](https://docs.docker.com/docker-for-mac/install/)

View File

@ -1,4 +1,4 @@
##
#
Docker Hub
@ -12,7 +12,7 @@
Azure `https://dockerhub.azk8s.cn`
### Ubuntu 16.04+Debian 8+CentOS 7
## Ubuntu 16.04+Debian 8+CentOS 7
使 [systemd](https://www.freedesktop.org/wiki/Software/systemd/) 的系统,请在 `/etc/docker/daemon.json` 中写入如下内容(如果文件不存在请新建该文件)
@ -36,7 +36,7 @@ $ sudo systemctl restart docker
> `docker.service` `--registry-mirror=https://dockerhub.azk8s.cn`
### Windows 10
## Windows 10
使 `Windows 10` Docker `Settings` `Docker Engine` json `Apply & Restart` Docker
@ -49,7 +49,7 @@ $ sudo systemctl restart docker
}
```
### macOS
## macOS
使 macOS Docker Desktop -> `Perferences` `Docker Engine` json `Apply & Restart` Docker
@ -62,7 +62,7 @@ $ sudo systemctl restart docker
}
```
###
##
`$ docker info`
@ -71,7 +71,7 @@ Registry Mirrors:
https://dockerhub.azk8s.cn/
```
### gcr.io
## gcr.io
`gcr.io/*` `gcr.io/<repo-name>/<image-name>:<version>` `gcr.azk8s.cn/<repo-name>/<image-name>:<version>` ,

View File

@ -1,8 +1,8 @@
## Docker CE
# Docker CE
> Docker APT 使 apt Docker.
###
##
Docker CE `x86_64` `ARM` `ARM` Docker CE
@ -12,7 +12,7 @@ Docker CE 支持以下版本的 [Raspbian](https://www.raspberrypi.org/downloads
** `Raspbian` [](http://www.raspberrypi.org/) 推荐用于树莓派的首选系统,其基于 `Debian`。
### 使 APT
## 使 APT
apt 使 HTTPS 使 HTTPS CA
@ -58,7 +58,7 @@ $ sudo add-apt-repository \
> Docker CE APT Docker CE stable test nightly
#### Docker CE
### Docker CE
apt `docker-ce`
@ -68,7 +68,7 @@ $ sudo apt-get update
$ sudo apt-get install docker-ce
```
### 使
## 使
Docker 便Raspbian 使 `--mirror` 使
@ -80,14 +80,14 @@ $ sudo sh get-docker.sh --mirror Aliyun
Docker CE (stable)
### Docker CE
## Docker CE
```bash
$ sudo systemctl enable docker
$ sudo systemctl start docker
```
### docker
## docker
`docker` 使 [Unix socket](https://en.wikipedia.org/wiki/Unix_domain_socket) 与 Docker 引擎通讯。而只有 `root` 用户和 `docker` 组的用户才可以访问 Docker 引擎的 Unix socket。出于安全考虑一般 Linux 系统上不会直接使用 `root` 用户。因此,更好地做法是将需要使用 `docker` 的用户加入 `docker` 用户组。
@ -105,7 +105,7 @@ $ sudo usermod -aG docker $USER
退
### Docker
## Docker
```bash
$ docker run arm32v7/hello-world
@ -142,6 +142,6 @@ For more examples and ideas, visit:
** ARM 使 `x86` Raspbian 使访 [arm32v7](https://hub.docker.com/u/arm32v7/)。
###
##
使 Docker Docker [](mirror.md)

View File

@ -1,10 +1,10 @@
## Ubuntu Docker CE
# Ubuntu Docker CE
> Docker APT 使 apt Docker.
###
##
####
###
Docker CE [Ubuntu](https://www.ubuntu.com/server) 操作系统:
@ -15,7 +15,7 @@ Docker CE 支持以下版本的 [Ubuntu](https://www.ubuntu.com/server) 操作
Docker CE 64 x86 ARM Ubuntu LTSLong-Term-Support 5 使 LTS
####
###
Docker `docker` `docker-engine`使
@ -25,7 +25,7 @@ $ sudo apt-get remove docker \
docker.io
```
### 使 APT
## 使 APT
`apt` 使 HTTPS 使 HTTPS CA
@ -69,7 +69,7 @@ $ sudo add-apt-repository \
> Docker CE APT Docker CE stable test nightly
#### Docker CE
### Docker CE
apt `docker-ce`
@ -79,7 +79,7 @@ $ sudo apt-get update
$ sudo apt-get install docker-ce
```
### 使
## 使
Docker 便Ubuntu 使 `--mirror` 使
@ -91,14 +91,14 @@ $ sudo sh get-docker.sh --mirror Aliyun
Docker CE (stable)
### Docker CE
## Docker CE
```bash
$ sudo systemctl enable docker
$ sudo systemctl start docker
```
### docker
## docker
`docker` 使 [Unix socket](https://en.wikipedia.org/wiki/Unix_domain_socket) 与 Docker 引擎通讯。而只有 `root` 用户和 `docker` 组的用户才可以访问 Docker 引擎的 Unix socket。出于安全考虑一般 Linux 系统上不会直接使用 `root` 用户。因此,更好地做法是将需要使用 `docker` 的用户加入 `docker` 用户组。
@ -116,7 +116,7 @@ $ sudo usermod -aG docker $USER
退
### Docker
## Docker
```bash
$ docker run hello-world
@ -151,10 +151,10 @@ For more examples and ideas, visit:
###
##
使 Docker Docker [](mirror.md)
###
##
* [Docker Ubuntu ](https://docs.docker.com/install/linux/docker-ce/ubuntu/)

View File

@ -1,16 +1,16 @@
## Windows 10 Docker Desktop CE
# Windows 10 Docker Desktop CE
###
##
[Docker Desktop for Windows](https://docs.docker.com/docker-for-windows/install/) 支持 64 位版本的 Windows 10 Pro且必须开启 Hyper-V。
###
##
[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。
`Docker Desktop Installer.exe`
###
##
Windows Docker Docker for Windows
@ -24,10 +24,10 @@ Docker CE 启动之后会在 Windows 任务栏出现鲸鱼图标。
![](_images/install-win-success-popup-cloud.png)
###
##
使 Docker Docker [](mirror.md)
###
##
* [](https://docs.docker.com/docker-for-windows/install/)

View File

@ -1,18 +1,18 @@
## Docker Hub
# Docker Hub
Docker [Docker Hub](https://hub.docker.com/),其中已经包括了数量超过 [2,650,000](https://hub.docker.com/search/?type=image) 的镜像。大部分需求都可以通过在 Docker Hub 中直接下载镜像来实现。
###
##
https://hub.docker.com 免费注册一个 Docker 账号。
###
##
`docker login` Docker Hub
`docker logout` 退
###
##
`docker search` `docker pull`
@ -49,7 +49,7 @@ Pulling repository centos
7064731afe90: Download complete
```
###
##
`docker push` Docker Hub
@ -72,7 +72,7 @@ NAME DESCRIPTION STARS
username/ubuntu
```
###
##
Automated Builds便

View File

@ -1,8 +1,8 @@
## Nexus3.x
# Nexus3.x
使 Docker Registry Registry Nexus `Nexus3.x` Docker 使 [`Nexus3.x`](https://www.sonatype.com/download-oss-sonatype/) 一个软件来管理 `Docker` , `Maven` , `Yum` , `PyPI` 等是一个明智的选择。
### Nexus
## Nexus
```bash
$ docker run -d --name nexus3 --restart=always \
@ -15,7 +15,7 @@ $ docker run -d --name nexus3 --restart=always \
Nexus `admin` `admin123` 齿
###
##
`Repository->Repositories` `Create repository` `docker (hosted)`
@ -26,7 +26,7 @@ $ docker run -d --name nexus3 --restart=always \
docker (proxy) DockerHub docker (group) hosted proxy 访 DockerHub Nexus
### 访
## 访
`Security->Realms` Docker Bearer Token Realm
@ -34,7 +34,7 @@ $ docker run -d --name nexus3 --restart=always \
`Security->Users`->`Create local user` `Roles`
### NGINX
## NGINX
[`私有仓库高级配置`](registry_auth.md)
@ -89,7 +89,7 @@ server {
}
```
### Docker 访
## Docker 访
SSL Docker Docker

View File

@ -1,4 +1,4 @@
##
#
使 Docker Hub 便使
@ -6,9 +6,9 @@
[`docker-registry`](https://docs.docker.com/registry/) 是官方提供的工具,可以用于构建私有的镜像仓库。本文内容基于 [`docker-registry`](https://github.com/docker/distribution) v2.x 版本。
### docker-registry
## docker-registry
####
###
`registry`
@ -25,7 +25,7 @@ $ docker run -d \
registry
```
###
##
使 `docker tag` `127.0.0.1:5000`
@ -91,13 +91,13 @@ REPOSITORY TAG IMAGE ID CREAT
127.0.0.1:5000/ubuntu:latest latest ba5877dc9bec 6 weeks ago 192.7 MB
```
###
##
使 `127.0.0.1:5000` `192.168.199.100:5000`
Docker `HTTPS` Docker `HTTPS` 访
#### Ubuntu 16.04+, Debian 8+, centos 7
### Ubuntu 16.04+, Debian 8+, centos 7
使 `systemd` `/etc/docker/daemon.json`
@ -114,6 +114,6 @@ REPOSITORY TAG IMAGE ID CREAT
> `json` Docker
###
##
Docker Desktop for Windows Docker Desktop for Mac `Docker Engine`

View File

@ -1,10 +1,10 @@
##
#
使 `Docker Compose` TLS
###
##
使 `openssl`
@ -82,7 +82,7 @@ $ openssl x509 -req -days 750 -in "site.csr" -sha256 \
`ssl` `docker.domain.com.key` `docker.domain.com.crt` `root-ca.crt`
###
##
`/etc/docker/registry/config.yml` `config.yml`
@ -124,7 +124,7 @@ health:
threshold: 3
```
### http
## http
```bash
$ mkdir auth
@ -137,7 +137,7 @@ $ docker run --rm \
> `username` `password`
### `docker-compose.yml`
## `docker-compose.yml`
```yaml
version: '3'
@ -155,7 +155,7 @@ volumes:
registry-data:
```
### hosts
## hosts
`/etc/hosts`
@ -163,7 +163,7 @@ volumes:
127.0.0.1 docker.domain.com
```
###
##
```bash
$ docker-compose up -d
@ -171,7 +171,7 @@ $ docker-compose up -d
TLS
###
##
CA CA `ssl/root-ca.crt` `/etc/docker/certs.d/docker.domain.com`
@ -213,6 +213,6 @@ no basic auth credentials
###
##
`443` [Nginx ](https://docs.docker.com/registry/recipes/nginx/),这里不再赘述。

View File

@ -1,4 +1,4 @@
##
#
Docker `C/S` Docker `Daemon`

View File

@ -1,4 +1,4 @@
##
#
[cgroups](https://en.wikipedia.org/wiki/Cgroups))是 Linux 内核的一个特性,主要用来对共享资源进行隔离、限制、审计等。只有能控制分配到容器的资源,才能避免当多个容器同时运行时的对系统资源的竞争。

View File

@ -1,4 +1,4 @@
##
#
Docker `LXC` 0.7 LXC使 [libcontainer](https://github.com/docker/libcontainer),从 1.11 开始,则进一步演进为使用 [runC](https://github.com/opencontainers/runc) 和 [containerd](https://containerd.tools/)。

View File

@ -1,22 +1,22 @@
##
#
Linux
### pid
## pid
pid pid LXC Docker Docker LXC 便 Docker
### net
## net
pid pid host net net IP /proc/net Docker veth host Docker docker0
### ipc
## ipc
Linux (interprocess communication - IPC) VM host pid IPC IPC 32 id
### mnt
## mnt
chrootmnt chroot /proc/mounts mount point
### uts
## uts
UTS("UNIX Time-sharing System") hostname domain name 使
### user
## user
id
* Linux [](https://blog.scottlowe.org/2013/09/04/introducing-linux-network-namespaces/)。

View File

@ -1,8 +1,8 @@
## Docker
# Docker
Docker Linux veth pair
###
##
Docker
@ -10,7 +10,7 @@ Linux 通过在内核中进行数据复制来实现虚拟接口之间的数据
Docker `veth pair`
###
##
Docker
*
* docker0 veth65f9
@ -25,7 +25,7 @@ Docker 创建一个容器的时候,会执行如下操作:
* `--net=container:NAME_or_ID` Docker IP `lo`
* `--net=none` Docker
###
##
使 `--net=none` 访 Docker
`/bin/bash` `--net=none`

View File

@ -1,4 +1,4 @@
##
#
[UnionFS](https://en.wikipedia.org/wiki/UnionFS))是一种分层、轻量级并且高性能的文件系统,它支持对文件系统的修改作为一次提交来一层层的叠加,同时可以将不同目录挂载到同一个虚拟文件系统下(unite several directories into a single virtual filesystem)。