- 更新Dockerfile为多阶段构建,提升安全性和构建效率 - 重构docker-compose.yml,添加健康检查和网络配置 - 新增Docker镜像构建和推送脚本 - 修复Maven打包配置,移除不必要的配置项 - 添加.dockerignore文件优化构建上下文 - 删除旧的deploy.sh脚本 - 新增JAR部署和回滚脚本 注意:此为开发中版本,请勿部署到生产环境
私有 Docker 仓库使用速查表
仓库地址: https://docker-registry.julyhaven.com
用户名: hucs
密码: hucsdev
登录
docker login docker-registry.julyhaven.com -u hucs -p hucsdev
推送镜像 (示例: myapp:1.0.0)
docker tag myapp:1.0.0 docker-registry.julyhaven.com/myteam/myapp:1.0.0 docker push docker-registry.julyhaven.com/myteam/myapp:1.0.0
同时推送 latest
docker tag myapp:1.0.0 docker-registry.julyhaven.com/myteam/myapp:latest docker push docker-registry.julyhaven.com/myteam/myapp:latest
拉取镜像
docker pull docker-registry.julyhaven.com/myteam/myapp:1.0.0 docker pull docker-registry.julyhaven.com/myteam/myapp:latest
测试镜像 (hello-world)
docker pull hello-world docker tag hello-world docker-registry.julyhaven.com/test/hello-world:latest docker push docker-registry.julyhaven.com/test/hello-world:latest docker pull docker-registry.julyhaven.com/test/hello-world:latest