修改和新增
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
2025-12-23 01:53:01 +08:00
parent 89a07bc062
commit b44594def6
17 changed files with 922 additions and 110 deletions

View File

@@ -22,10 +22,18 @@
**更多参数**
- `--hosts-dir "/etc/containerd/certs.d"`:指定了包含镜像仓库证书的目录的路径。
```bash
ctr --debug=true i pull --hosts-dir=/etc/containerd/certs.d docker.io/library/nginx:latest
```
- `-k`:忽略 TLS 验证过程中的证书错误。
- `--plain-http=true`:此选项指明在拉取镜像时使用未加密的 HTTP 协议,而不是加密的 HTTPS。
| 参数部分 | 说明 | 详细解释 |
| :-------------------------------------: | :--: | :----------------------------------------------------------: |
| **--debug=true** | | - 启用详细日志输出 - 显示执行过程中的详细信息 - 便于故障排查 |
| **i** | | `images` 的缩写,表示进行镜像相关操作 |
| **pull** | | 拉取(下载)镜像到本地 |
| **--hosts-dir=/etc/containerd/certs.d** | | - 指定证书和注册表配置目录 - 用于配置私有注册表或镜像仓库的认证信息 - 可以覆盖默认的 registry 配置 |
| -k | | 忽略 TLS 验证过程中的证书错误 |
| --plain-http=true | | 此选项指明在拉取镜像时使用未加密的 HTTP 协议,而不是加密的 HTTPS |
- 推送镜像
@@ -33,6 +41,4 @@
ctr -n k8s.io image push -u <账户>:<密码> docker.io/library/nginx:latest
```
**更多参数**
- `--plain-http=true`:此选项指明在拉取镜像时使用未加密的 HTTP 协议,而不是加密的 HTTPS。