Docker cannot find the path because the built-in shell command cannot be set as a running command. The solution is to use the "docker exec -it a1 bash -c "<bash>"" command.
The operating environment of this tutorial: Windows 7 system, Docker version 20.10.11, Dell G3 computer.
What should I do if docker cannot find the path?
Problem description:
docker exec system cannot find the specified path
>docker exec -it a1 echo "hello..." > /var/www/html/index.html 系统找不到指定的路径。 >docker exec -it a1 bash -c 'echo "hello..." > /var/www/html/index.html' 系统找不到指定的路径。 >docker exec -it a1 bash -c "echo 'hello...' > /var/www/html/index.html" >docker exec -it a1 cat /var/www/html/index.html hello...
Solution:
The built-in shell command cannot be set as a running command. You must use: docker exec -it a1 bash -c "<bash>"
Recommended learning : "docker video tutorial"
The above is the detailed content of What should I do if docker cannot find the path?. For more information, please follow other related articles on the PHP Chinese website!