What should I do if docker cannot find the path?

藏色散人
Release: 2022-11-04 14:03:04
Original
3186 people have browsed it

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.

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 &#39;echo "hello..." > /var/www/html/index.html&#39;
系统找不到指定的路径。
>docker exec -it a1 bash -c "echo &#39;hello...&#39; > /var/www/html/index.html"
>docker exec -it a1 cat /var/www/html/index.html
hello...
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template