简体   繁体   English

IntelliJ IDEA和Docker插件

[英]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,DeploymentDocker

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.

相关问题 IntelliJ Idea中的Docker插件“无法在...下找到证书文件” - Docker plugin in IntelliJ Idea "Can't locate certificate files under ..." 由于Intellij Idea CE 2016.1的Docker插件安装失败<required plugin “org.jetbrains.plugins.remote-run” not installed.> - Failed Installation of Docker plugin for Intellij Idea CE 2016.1 due to <required plugin “org.jetbrains.plugins.remote-run” not installed.> Dockerfile 未能在 Intellij Idea 中部署(未连接到 docker) - Dockerfile failed to deploy (not connected to docker) in Intellij Idea 如何在 intellij idea 中调试 JDK docker 容器? - How to debug a JDK docker container in intellij idea? 如何连接 IntelliJ IDEA / WebStorm 与 Docker Desktop - How to connect IntelliJ IDEA / WebStorm with Docker Desktop IntelliJ Docker插件使用环境文件 - IntelliJ Docker plugin use env file 将Intellij IDEA DB Navigator Plugin连接到Oracle DB连接 - Connecting Intellij IDEA DB Navigator Plugin to Oracle DB connection Spring 使用 docker 启动开发 intellij idea build 花费的时间太长 - Spring boot development with docker intellij idea build takes too long 在 IntelliJ IDEA 的 docker 中运行 gradle 测试任务 - Run gradle test tasks in docker from IntelliJ IDEA 从IntelliJ IDEA远程调试Docker容器中的Java 9 - Remote debugging Java 9 in a docker container from IntelliJ IDEA
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM