use new container attach on already container go on debug
use new container attach on already container go on debug
docker-debug is an troubleshooting running docker container,
which allows you to run a new container in running docker for debugging purpose.
The new container will join the pid, network, user, filesystem and ipc namespaces of the target container,
so you can use arbitrary trouble-shooting tools without pre-installing them in your production container image.
Install the docker-debug cli
mac brew
brew install zeromake/docker-debug/docker-debug
download binary file
use bash or zsh
…
use fish
…
download the latest binary from the release page and add it to your PATH.
Try it out!
# docker-debug [OPTIONS] CONTAINER COMMAND [ARG...] [flags]
docker-debug CONTAINER COMMAND
# More flags
docker-debug --help
# info
docker-debug info
Clone this repo and:
go build -o docker-debug ./cmd/docker-debug
mv docker-debug /usr/local/bin
docker-debug uses nicolaka/netshoot as the default image to run debug container. You can override the default image with cli flag, or even better, with config file ~/.docker-debug/config.toml
version = "0.7.5"
image = "nicolaka/netshoot:latest"
mount_dir = "/mnt/container"
timeout = 10000000000
config_default = "default"
[config]
[config.default]
version = "1.40"
host = "unix:///var/run/docker.sock"
tls = false
cert_dir = ""
cert_password = ""
-v cli args supportdocker-debug inspiration is from to this a kubectl debug tool.docker-debug filesystem is from the blog.This project exists thanks to all the people who contribute. [Contribute].
Become a financial contributor and help us sustain our community. [Contribute]
Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]
No open issues yet, or sync has not completed.