"" command."/> "" command.">

Home >Operation and Maintenance >Docker >What should I do if docker cannot find the path?

What should I do if docker cannot find the path?

藏色散人
藏色散人Original
2022-11-04 14:03:043228browse

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 "158e32f27d55914793b8e29ec85aaa34"" command.

What should I do if docker cannot find the path?

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 "158e32f27d55914793b8e29ec85aaa34"

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn