docker 制作镜像并push至私有仓库

1.制作镜像

在Dockerfile中配置好FROM和RUN

 2.制作镜像

docker build -t image-myself . -f dockerfile_registry

 3.打标签

docker tag image-my:latest localhost:5001/image-registry:v1

4.配置/etc/docker/daemon.json文件

 5.systemctl restart docker 

 6.推送至仓库

docker push localhost:5001/image-registry:v1

7.push完毕后查看仓库是否已存在该镜像

接下来,大家就可以使用你的镜像了~~~ 

猜你喜欢

转载自blog.csdn.net/qq_40132294/article/details/120276921