我使用jpetazzo/nsenter
将nsenter
安装到"/usr/local/bin"
但我找不到“/ usr / local / bin”中的nsenter,"bash: nsenter: command not found"
bash-3.2$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
ubuntu mengka 8eaa4ff06b53 2 weeks ago 188.3 MB
fedora latest 834629358fe2 2 weeks ago 241.3 MB
jpetazzo/nsenter latest 6ed3da1d7fa6 7 weeks ago 367.7 MB
bash-3.2$ docker run -v /usr/local/bin:/target jpetazzo/nsenter
Installing nsenter to /target
Installing docker-enter to /target
bash-3.2$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c0c5ce8f8059 jpetazzo/nsenter:latest "/bin/sh -c /install 8 seconds ago Exited (0) 7 seconds ago adoring_colden
171c2439b5c7 jpetazzo/nsenter:latest "/bin/sh -c /install 4 minutes ago Exited (0) 4 minutes ago insane_pasteur
07d6e341af00 jpetazzo/nsenter:latest "/bin/sh -c /install 11 minutes ago Exited (0) 9 minutes ago stupefied_carson
18cab084f4f6 mengka-image-time01:latest "/bin/sh mengka.sh" 19 hours ago Exited (0) 4 hours ago fervent_morse
bash-3.2$ nsenter
bash: nsenter: command not found
答案 0 :(得分:0)
我知道它没有回答这个问题,但是你知道Docker 1.3引入了一个新的" exec"命令?
答案 1 :(得分:0)
你应该使用
docker run --name nsenter -it ubuntu:14.04
进入像ubuntu或中心操作系统的操作系统,你可以
答案 2 :(得分:-1)
docker run --rm jpetazzo/nsenter cat /nsenter > /tmp/nsenter && chmod +x /tmp/nsenter