云数据库虚拟主机(云服务器云虚拟主机)
241
2022-07-13
1.修改linux服务器docker配置文件
vim /usr/lib/systemd/system/docker.service
添加配置
ExecStart=/usr/bin/dockerd
-H fd:// --containerd=/run/containerd/containerd.sock
-H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
重启docker
systemctl daemon-reload
systemctl restart docker
2.Idea下载docker插件
3.修改项目pom文件
4.打包、build
---> Running in 0ff0ece2e746 Removing intermediate container 0ff0ece2e746 ---> 76846947b2eb Step 4/4 : ENTRYPOINT ["java","-jar","/app.jar"]
---> Running in fac72c653afd Removing intermediate container fac72c653afd ---> f7866a998d4e ProgressMessage{id=null, status=null, stream=null, error=null, progress=null, progressDetail=null} Successfully built f7866a998d4e Successfully tagged idea2021test:latest [INFO] Built idea2021test [INFO] Tagging idea2021test with latest [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:43 min [INFO] Finished at: 2021-06-17T21:02:25+08:00
表示build成功
5.创建容器
6.配置映射端口
7.运行
发表评论
暂时没有评论,来抢沙发吧~