- Registry web-ui 获取
docker pull hyper/docker-registry-web
编辑配置文件 vim RegistryWebUi/config.yml
registry:
# Docker registry url
url: http://ip:端口/v2
# Docker registry fqdn
name: localhost:端口
# To allow image delete, should be false
readonly: false
auth:
# Disable authentication
enabled: false ##如果不需要分用户权限设置,推荐选择false
- Registry web-ui 运行
docker run -d -p 10082:8080 --name registry-web --link myRegistry -v $(pwd)/RegistryWebUi/:/conf/:ro hyper/docker-registry-web:latest
* --link myRegistry 这边的myRegistry是我之前搭建的docker仓库容器的名字
* 之前搭建docker仓库的命令是:
ocker run -p 31000:5000 --restart=always -itd --privileged=true -v /hardDisk_sdd/registry:/var/lib/registry --name myRegistry -v /etc/localtime:/etc/localtime registry:latest
- Registry 设置
sudo docker exec -it myRegistry /bin/sh
cd /etc/docker/registry
vi config.yml
加入
delete:
# To allow image delete
enabled: true
version: 0.1
log:
level: info
formatter: text
fields:
service: registry
environment: OfficeProduction
storage:
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
delete:
# To allow image delete
enabled: true
http:
addr: :31000
headers:
X-Content-Type-Options: [nosniff]
health:
storagedriver:
enabled: true
interval: 10s
threshold: 3
- 重启 myRegistry
sudo docker restart myRegistry