【SpringCloud-学习笔记】Docker镜像仓库

1. 常见镜像仓库服务

镜像仓库( Docker Registry )有公共的和私有的两种形式:

2. 私有镜像仓库

Docker镜像仓库

3. 在私有镜像仓库推送或拉取镜像

推送镜像到私有镜像服务必须先tag,步骤如下:

  1. 重新tag本地镜像,名称前缀为私有仓库的地址:192.168.150.101:8080/
docker tag nginx:latest 192.168.150.101:8080/nginx:1.0 
  1. 推送镜像
docker push 192.168.150.101:8080/nginx:1.0 
  1. 拉取镜像
docker pull 192.168.150.101:8080/nginx:1.0 

4 总结

  1. 推送本地镜像到仓库前都必须重命名(docker tag)镜像,以镜像仓库地址为前缀
  2. 镜像仓库推送前需要把仓库地址配置到docker服务的daemon.json文件中,被docker信任
  3. 推送使用docker push命令
  4. 拉取使用docker pull命令

猜你喜欢

转载自blog.csdn.net/qq_30999361/article/details/126208354
今日推荐