Docker 本地私有仓库搭建:

 

创建数据卷目录:

mkdir /home/sky/registry

 

用registry镜像启动容器:

docker run -d -p 5000:5000 -v /home/sky/registry:/var/lib/registry --restart=always --name registry registry:2

 

上传镜像:

docker tag hello-world localhost:5000/hello-world:latest

docker push localhost:5000/hello-world:latest

 

查询镜像:

curl http://localhost:5000/v2/_catalog
Docker 本地私有仓库搭建:

 

下载镜像:

docker pull localhost:5000/hello-world

验证: 如果删除容器,是否上传的镜像没有丢失。这是因为数据卷起了作用。

 Docker 本地私有仓库搭建:

 

相关文章:

  • 2021-12-26
  • 2022-12-23
  • 2021-04-25
  • 2021-10-31
  • 2021-08-10
  • 2021-04-06
猜你喜欢
  • 2021-08-16
  • 2022-02-11
  • 2021-09-06
  • 2022-12-23
  • 2021-10-10
相关资源
相似解决方案