104 lines
2.7 KiB
Markdown
104 lines
2.7 KiB
Markdown
# docker.cattysteve.top使用说明
|
|
|
|
版本:v20240621
|
|
|
|
**注意:当前镜像源处于试运行状态,可能随时有变化。有疑问请联系pig2014。**
|
|
|
|
## 使用须知
|
|
|
|
由于服务器流量收费,因此使用时请遵循以下限制:
|
|
1. 拉取不快于每分钟1次
|
|
2. 单次拉取不超过1GB
|
|
|
|
若超出限制,可能会:
|
|
1. 被WAF防火墙阻断
|
|
2. 拉取无速度,假死
|
|
3. 被403拒绝
|
|
|
|
若发生违例,请联系pig2014手动处理。
|
|
|
|
## 匿名使用
|
|
|
|
目前`/docker.io`和`/registry.k8s.io`**都可以不登录帐号访问**,使用时可以跳过登录/输入密码/配置文件填写身份的操作。
|
|
|
|
**注意:若发现匿名帐号被不认识的人滥用,匿名使用会被关闭。**
|
|
|
|
## 省流版
|
|
|
|
```sh
|
|
docker pull docker.cattysteve.top/docker.io/<原来的镜像名>
|
|
# 例如:
|
|
docker pull docker.cattysteve.top/docker.io/ubuntu:latest
|
|
docker pull docker.cattysteve.top/docker.io/prom/prometheus:v2.51.1
|
|
```
|
|
|
|
## 已启用的后端
|
|
|
|
1. docker.cattysteve.top/docker.io
|
|
2. docker.cattysteve.top/registry.k8s.io
|
|
|
|
## docker/podman
|
|
|
|
登录(可选):
|
|
```sh
|
|
docker login docker.cattysteve.top
|
|
# (按提示输入用户和密码)
|
|
```
|
|
|
|
手动:
|
|
```sh
|
|
docker pull docker.cattysteve.top/docker.io/example/example:latest
|
|
```
|
|
|
|
自动:
|
|
在`/etc/docker/daemon.json`添加:
|
|
```json
|
|
{
|
|
"registry-mirrors": ["https://docker.cattysteve.top/docker.io"]
|
|
}
|
|
```
|
|
|
|
## k8s/containerd
|
|
|
|
在`/etc/containerd/containerd.conf`找到相应位置并修改:
|
|
```toml
|
|
[plugins."io.containerd.grpc.v1.cri".registry]
|
|
[plugins."io.containerd.grpc.v1.cri".registry.mirrors]
|
|
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry.k8s.io"]
|
|
endpoint = ["https://docker.cattysteve.top/registry.k8s.io"]
|
|
[plugins."io.containerd.grpc.v1.cri".registry.configs]
|
|
[plugins."io.containerd.grpc.v1.cri".registry.configs."https://docker.cattysteve.top/registry.k8s.io".auth]
|
|
username="你的用户名"
|
|
password="你的密码"
|
|
```
|
|
|
|
## k3s
|
|
|
|
在`/etc/rancher/k3s/registries.yaml`添加:
|
|
```yaml
|
|
mirrors:
|
|
docker.io:
|
|
endpoint:
|
|
- "https://docker.cattysteve.top/docker.io"
|
|
rewrite:
|
|
"^(.+)/": "docker.io/$1"
|
|
configs:
|
|
"https://docker.cattysteve.top/docker.io":
|
|
auth:
|
|
username: "你的用户名"
|
|
password: "你的密码"
|
|
```
|
|
|
|
## 手动模式
|
|
|
|
为避免CloudFlare后端失效,还有个保底手段:[GitHub手动拉取](https://github.com/Catty2014/ImagePuller),按README.md的提示进行操作可手动同步镜像
|
|
|
|
## 镜像托管
|
|
|
|
Harbor允许镜像托管(镜像上传),请先注册帐号,然后联系pig2014新增存储库。
|
|
|
|
## 更新计划
|
|
|
|
- [x] 改为OpenID登录
|
|
- [x] 启用基于CloudFlare的后端
|
|
- [x] 启用GitHub手动镜像功能 |