[英]Docker exec in docker windows
I'm having trouble with running我跑步有问题
`docker `exec -t sandbox /bin/sh -c 'echo "127.0.0.1 sandbox" >> /etc/hosts'
in windows docker.在 Windows 泊坞窗中。 I keep getting the following error:
我不断收到以下错误:
"The system cannot find the path specified"
Does anyone know why I am getting the error?有谁知道为什么我收到错误?
我发现使用"
而不是'
解决了这个问题:
docker exec -t sandbox /bin/sh -c "echo '127.0.0.1 sandbox' >> /etc/hosts"
instead of代替
docker exec -it [containerid] /bin/sh
try to use尝试使用
docker exec -it [containerid] //bin//sh
我会运行docker ps
来获取你正在运行的容器的 ID 然后做docker exec that_id /bin/bash
我正在使用docker exec -it [containerid] /bin/sh
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.