欢迎光临
我们一直在努力

Docker 搭建私有镜像仓库Registry

一,Registry

  1. 新建配置文件:/usr/local/app/config.yml

version: 0.1
log:
fields:
service: registry
storage:
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
http:
addr: :5000
headers:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Origin: [‘*’]
Access-Control-Allow-Methods: [‘*’]
Access-Control-Max-Age: [1728000]
health:
storagedriver:
enabled: true
interval: 10s
threshold: 3

2.运行docker registry 镜像

docker run -d -p 5000:5000 –name registry -v /usr/local/app/config.yml:/etc/docker/registry/config.yml -v /usr/local/registry:/var/lib/registry –restart=always registry:2

二、Docker Registry UI

  1. 运行docker 镜像
    docker run -d -p 80:80 joxit/docker-registry-ui

可以使用http://localhost 访问registry ui

http访问https问题可以查看:https://www.cnblogs.com/zhihongli/p/13140350.html

三、Push image 到Registry

docker tag imageId registryIp/project/imageName:tag
docker push registryIp/project/imageName:tag

 

引用:https://www.cnblogs.com/zhihongli/p/13140550.html

赞(0)
未经允许不得转载:自游互动 » Docker 搭建私有镜像仓库Registry
分享到: 更多 (0)

自由技术,自由自在

项目合作联系我们