I have a running docker container. I have done some useful works in the running docker container. I have done these works not part of dockerfile, i have done it inside the c
If you have a container my-cont
and you want to debug it, there is no need to install debugging tools inside it. What you can do instead is to use another container from a debug image e.g. xyz_docker_img
then let it shares the same namespaces with my-cont
container with extra capabilities you need for debugging.
$ docker run -it \
--pid=container:my-cont
--net:container:my-cont
--cap-add NET_RAW
--cap-add NET_ADMIN
--cap-add SYS_PTRACE
xyz_docker_image bash