使用新容器连接到已有的容器,继续进行调试
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-debugdownload 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 infoClone this repo and:
go build -o docker-debug ./cmd/docker-debug
mv docker-debug /usr/local/bindocker-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]
暂无开放 Issues,或尚未同步最近议题。