Reputation: 131
I'm having trouble with running
`docker `exec -t sandbox /bin/sh -c 'echo "127.0.0.1 sandbox" >> /etc/hosts'
in windows docker. I keep getting the following error:
"The system cannot find the path specified"
Does anyone know why I am getting the error?
Upvotes: 9
Views: 21605
Reputation: 141
instead of
docker exec -it [containerid] /bin/sh
try to use docker exec -it [containerid] //bin//sh
Upvotes: 13
Reputation: 131
I found out that using "
instead of '
fixes this:
docker exec -t sandbox /bin/sh -c "echo '127.0.0.1 sandbox' >> /etc/hosts"
Upvotes: 4
Reputation: 286
I'd run docker ps
to get the ID of your running container then do
docker exec that_id /bin/bash
Upvotes: 1