[英]IntelliJ IDEA and docker plugin
I am using IntelliJ IDEA 2017.1.4 with Docker plugin . 我正在将IntelliJ IDEA 2017.1.4与Docker插件一起使用 。 When I click debug, it will build the project, docker, it will start it up and I can see log from the container.
当我单击debug时,它将构建项目docker,它将启动它,并且我可以从容器中看到日志。 Unfortunatelly, debugger is not attached to that container.
不幸的是,调试器未附加到该容器。 Error message:
错误信息:
Cannot retrieve debug connection: java.net.MalformedURLException: unknown protocol: tcp
When I create new remote debug configuration for the defined port 5001, I can attach to running container. 当为定义的端口5001创建新的远程调试配置时,可以连接到正在运行的容器。 Why it's not attached directly from plugin please?
为什么请不要直接从插件中附加它?
My configuration: container_settings.json 我的配置: container_settings.json
{
"HostConfig": {
"PortBindings": {
"5001/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "5001"
}
]
}
}
}
Thank you. 谢谢。
Issue solved. 问题已解决。
In IntelliJ IDEA settings - Ctrl + Alt + S open Build, Execution, Deployment and Docker . 在IntelliJ IDEA设置-Ctrl + Alt + S中打开Build,Execution,Deployment和Docker 。
Previously my API url was tcp://localhost:2375
, and it build and deployed container without any problem, but did not attach debugger to it. 以前,我的API URL是
tcp://localhost:2375
,并且它可以毫无问题地构建和部署容器,但是没有将调试器附加到它。 After changing to https://localhost:2376
everything works perfect. 更改为
https://localhost:2376
一切正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.