Idea连接Docker在本地(Windows)开发SpringBoot
发布时间:2024年01月05日
当一些需要的服务在docker
容器中运行时,因为docker
网络等种种原因,不得不把在idea
开发的springboot
项目放到docker
容器中才能做测试或者运行。
1. 新建运行配置

2. 修改运行目标

3. 设置新目标Docker
推荐使用openjdk
镜像即可,运行选项就是平时运行Docker
的形参,--rm
是指当容器停止时自动删除,-p
暴露端口,一般都需要。包括--network
指定网络有需要也可以加上。

等待idea自动执行完成,下一步

保持默认即可,创建。

4. 选择运行主类

根据自己的情况选择一个。


5. 运行


成功。
文章来源:https://blog.csdn.net/m0_51390969/article/details/135418163
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:chenni525@qq.com进行投诉反馈,一经查实,立即删除!