So far I was able to understand following about docker:
You can use it to containerise your application - sandboxing.
You can use it as a build container, by "bind mounting" your source code directory and using build tools inside container to build it.
I am using docker for second use-case.
Question:
I am having a project with mixed C and C++ components, which I want to develop entirely inside docker container, as it requires lots of environment configuration and has old library dependencies, and I don't want to pollute environment of my development (host) machine.
I am able to build it inside docker using "gcc" but I am not able to figure out how to debug it.
I tried debugging it with gdbserver over a network port and attaching it's process inside Eclipse CDT (on host), but it don't maps back to my source-code rather it displays assembly code.
I would like to have it map back to my source-code for easy debugging. Can someone please suggest me appropriate workflow or point me in right direction ?