docker registry 搭建

registry 搭建

假設在 cd /root 目錄下docker

最新bash

docker run -d -p 5000:5000 -v pwd/data:/var/lib/registry --restart=always --name registry daocloud.io/library/registry:2.3.0dom

安裝帶證書的

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/_catalogcurl

相關文章
相關標籤/搜索