1 建立Dockerfile
2 构建镜像 docker build -t puzzle10/patient:0.1.0 .
3 运行镜像 docker run -p host_port:port puzzle10/patient:0.1.0
4 推送镜像
docker login
docker push puzzle10/patient:0.1.0
5 搭建私有仓库
docker run -d -p 5000:5000 —restart=always —name registry2 registry:2
6 推送到私有仓库
docker push localhost:5000/puzzle10/patient:0.1.0
本文介绍如何通过Dockerfile创建镜像、构建、运行并推送至公有及私有仓库的步骤。涵盖从镜像的基础构建到高级用法,如使用私有仓库等内容。
65

被折叠的 条评论
为什么被折叠?



