Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker exec in docker windows

Tags:

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. I keep getting the following error:

"The system cannot find the path specified"

Does anyone know why I am getting the error?

like image 265
user7208544 Avatar asked Oct 28 '22 21:10

user7208544


1 Answers

instead of
docker exec -it [containerid] /bin/sh

try to use
docker exec -it [containerid] //bin//sh

like image 185
nish8690 Avatar answered Nov 15 '22 07:11

nish8690