1.查看远程仓库中的列表
$ sudo docker search registry //会列出你所需要的仓库
2.获取registry仓库
$ sudo docker pull registry //最新
3.运行
$ sudo docker run -p 5000:5000 docker.io/registry //-p映射端口
3.1查看容器运行情况
[[email protected] docker]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2119ae9bc14d registry:2.5.0 "/entrypoint.sh /etc 17 minutes ago Up 17 minutes 0.0.0.0:5000->5000/tcp sharp_sinoussi
4.打开浏览器访问显示如下内容说明运行正常,说明docker的私有仓库已经运行成功。
ip:5000/v2
镜像:docker/image/devicemapper/imagedb/content/sha256/
容器:docker/containers
时间: 2024-10-26 05:45:47