Add blank lines around headers

This commit is contained in:
yeasy
2026-03-24 09:27:04 -07:00
parent 857e3b73f6
commit ae8636e96f
112 changed files with 468 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ centos The official build of CentOS. 7000+ [OK]
```bash
$ docker pull nginx:alpine
```
#### 3. 推送镜像
需要先登录
@@ -108,6 +109,7 @@ $ docker push username/myapp:v1
```bash
$ echo "dckr_pat_xxxxxxx" | docker login --username username --password-stdin
```
#### 3. 关注镜像漏洞
Docker Hub 会对官方镜像和付费用户的镜像进行安全扫描在镜像标签页可以看到漏洞扫描结果

View File

@@ -25,6 +25,7 @@ $ docker run -d \
-v /opt/data/registry:/var/lib/registry \
registry
```
### 6.2.2 在私有仓库上传搜索下载镜像
创建好私有仓库之后就可以使用 `docker tag` 来标记一个镜像然后推送它到仓库例如私有仓库地址为 `127.0.0.1:5000`
@@ -86,6 +87,7 @@ $ docker image ls
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
127.0.0.1:5000/ubuntu:latest latest ba5877dc9bec 6 weeks ago 192.7 MB
```
### 6.2.3 配置非 https 仓库地址
如果你不想使用 `127.0.0.1:5000` 作为仓库地址比如想让本网段的其他主机也能把镜像推送到私有仓库你就得把例如 `192.168.199.100:5000` 这样的内网地址作为私有仓库地址这时你会发现无法成功推送镜像

View File

@@ -114,6 +114,7 @@ health:
interval: 10s
threshold: 3
```
### 6.3.3 生成 http 认证文件
```bash
@@ -143,6 +144,7 @@ services:
volumes:
registry-data:
```
### 6.3.5 修改 Hosts 文件
编辑 `/etc/hosts`
@@ -150,6 +152,7 @@ volumes:
```bash
127.0.0.1 docker.domain.com
```
### 6.3.6 启动
```bash

View File

@@ -107,6 +107,7 @@ server {
error_page 500 502 503 504 /50x.html;
}
```
### 6.4.5 Docker 主机访问镜像仓库
如果不启用 SSL 加密可以通过[前面章节](6.2_registry.md)的方法添加非 https 仓库地址到 Docker 的配置文件中然后重启 Docker