idea 结合docker远程进行项目部署

原创
2021/08/13 14:12
阅读数 40

1修改docker配置文件

  • 进入到服务器 /lib/systemd/system/ 路径中
  • 在 ExecStart=/usr/bin/dockerd 后面最佳 -H tcp://0.0.0.0:2375
  • 重新启动docker
systemctl daemon-reload
systemctl restart docker
{"Platform":{"Name":""},"Components":[{"Name":"Engine","Version":"20.10.7","Details":{"ApiVersion":"1.41","Arch":"amd64","BuildTime":"2021-08-04T19:22:59.000000000+00:00","Experimental":"false","GitCommit":"20.10.7-0ubuntu1~18.04.1","GoVersion":"go1.13.8","KernelVersion":"4.15.0-151-generic","MinAPIVersion":"1.12","Os":"linux"}},{"Name":"containerd","Version":"1.5.2-0ubuntu1~18.04.2","Details":{"GitCommit":""}},{"Name":"runc","Version":"1.0.0~rc95-0ubuntu1~18.04.2","Details":{"GitCommit":""}},{"Name":"docker-init","Version":"0.19.0","Details":{"GitCommit":""}}],"Version":"20.10.7","ApiVersion":"1.41","MinAPIVersion":"1.12","GitCommit":"20.10.7-0ubuntu1~18.04.1","GoVersion":"go1.13.8","Os":"linux","Arch":"amd64","KernelVersion":"4.15.0-151-generic","BuildTime":"2021-08-04T19:22:59.000000000+00:00"}

2 idea配置docker

  • 打开 idea配置中心, 或者使用ctr+ alt + s,进入如下配置

3 项目配置docker发布

  • 创建Dockerfile在项目的根目录
  • 创建docker服务
  • 测试启动docker服务
  • 访问服务器http://IP:绑定端口/服务 测试服务是否可用
展开阅读全文
加载中

作者的其它热门文章

打赏
0
0 收藏
分享
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部