registry 搭建
假设在 cd /root 目录下
最新
docker run -d -p 5000:5000 -v
pwd
/data:/var/lib/registry --restart=always --name registry daocloud.io/library/registry:2.3.0
安装带证书的
docker run -d -p 5000:5000 --restart=always --name registry \
-v `pwd`/data:/var/lib/registry \
-v `pwd`/certs:/certs \
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \
-e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \
daocloud.io/library/registry:2.3.0
mkdir -p /etc/docker/certs.d/local.03in.com.com:5000
cp certs/domain.crt /etc/docker/certs.d/local.03in.com:5000/ca.crt
sudo service docker restart
查看仓库的镜像列表
https://local.03in.com:5000/v2/_catalog
curl 操作
curl --cacert domain.crt --basic https://local.03in.com:5000/v2/_catalog