1. 从github下载registry 二进制包
wget https://ghproxy.com/https://github.com/distribution/distribution/releases/download/v2.8.2/registry_2.8.2_linux_amd64.tar.gz
2. 解压获取二进制文件registry
tar -zxvf registry_2.8.2_linux_amd64.tar.gz
3. 创建配置文件config.yml
version: 0.1
log:
level: info
formatter: json
fields:
service: registry
storage:
filesystem:
rootdirectory: /path/to/registry/data
http:
addr: :5000
headers:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Origin: ['*']
4. 启动服务
./registry serve config.yml