How to debug a Minimus container by mounting debug tools
dev
tagged Minimus images for troubleshooting whenever possible, sometimes it may be necessary to mount a debugger on a production container.
Prepare the debugger container
docker export
saves the root filesystem of the container to a tar archive|
(the pipe) passes the output directly into the next command to avoid creating an intermediate tar filetar -xC debugger
extracts the archive files and saves them to the local directoryStart the target container and mount the debugger image
Start the debugging session
my-image
) share namespaces and cgroups.Update the system's executable search path
/.debugger/bin
to the current shell’s path environment variable to make the tools executable from anywhere. This works because the BusyBox toolkit in the mounted volume is statically linked.Ready to debug!