多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# Docker hub操作 =============================== Docker hub操作指南Start ================================= * [ ] 将【镜像名:标签】替换为自己dockerhub的镜像【用户名/镜像名:标签】 docker tag nginx:latest mrtomorrow/lnmp_nginx:v1 docker tag test2-php:latest mrtomorrow/lnmp_php:v1 docker tag mysql:5.7 mrtomorrow/lnmp_mysql:v1 docker tag redis:latest mrtomorrow/lnmp_redis:v1 docker tag mongo:4.4.6 mrtomorrow/lnmp_mongo:v1 * [ ] 将容器打包成镜像:docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]] Option 功能 -a 指定新镜像作者 -c 使用 Dockerfile 指令来创建镜像 -m 提交生成镜像的说明信息 -p 在 commit 时,将容器暂停 docker commit -a "Tomorrow" -m "docker-compose create nginx" f15767e9906b(容器CONTAINER ID) mrtomorrow/lnmp_nginx:v1 docker commit -a "Tomorrow" -m "docker-compose create php" c43af10a925c(容器CONTAINER ID) mrtomorrow/lnmp_php:v1 docker commit -a "Tomorrow" -m "docker-compose create mysql" 02fa3db31909(容器CONTAINER ID) mrtomorrow/lnmp_mysql:v1 docker commit -a "Tomorrow" -m "docker-compose create redis" d35e8cca19c4(容器CONTAINER ID) mrtomorrow/lnmp_redis:v1 docker commit -a "Tomorrow" -m "docker-compose create mongo" 14e79a717690(容器CONTAINER ID) mrtomorrow/lnmp_mongo:v1 * [ ] 将镜像上传至dockerhub:docker push 用户名/仓库名(:标签) docker push mrtomorrow/lnmp_nginx:v1 docker push mrtomorrow/lnmp_php:v1 docker push mrtomorrow/lnmp_mysql:v1 docker push mrtomorrow/lnmp_redis:v1 docker push mrtomorrow/lnmp_mongo:v1 拉取线上dockerhub镜像到本地 docker pull mrtomorrow/lnmp_nginx:v1 ================================= Docker hub操作指南End =========================== docker 创建虚拟主机,hosts配置为容器外的hosts还是容器内的hosts;【容器外部】 docker-compose vue是否需要安装;【否】 docker-compose 执行 up -d 启动前,是否需要执行build创建过程;【不论执行几个build构建对象,产生的镜像只有一个】