Delve debug go app in docker container with network_mode host

5 days ago 8
ARTICLE AD BOX

I want to debug my go code which is mounted into a docker container. Delve is installed inside the container.

I am using goland by jetbrains.

Everything works fine as long as I don't use the container parameter nerwork_mode: host.

But for my specific purpose (implementing Basler Pylon GigE cam) it is necessary to start the container with network_mode: host. When using this network mode my IDE tries to connect to the debugger without succeeding.

Is there any special setting or param for delve, goland or docker to make it work with network_mode: host?

I saw this post, but the solution was to not use network_mode: host, which ist not an option in my case.

Read Entire Article