docker bash: RUN: command not found
时间: 2023-12-22 19:28:42 浏览: 118
这个问题通常是由于在Docker容器中缺少某些软件包或命令导致的。在这种情况下,您可以尝试安装所需的软件包或命令。例如,如果您在Docker容器中运行bash shell并尝试运行vi编辑器,但是出现了“command not found”错误,那么您需要在Docker容器中安装vi编辑器。
如果您正在运行一个Dockerfile并且在其中使用RUN命令,但是出现了“command not found”错误,那么您需要检查RUN命令中的每个命令是否正确拼写并且是否在Docker容器中可用。
相关问题
bash: docker: command not found
This error message indicates that the Docker command-line tool is not installed on your system or is not in your system's PATH environment variable. To install Docker, follow the installation instructions for your operating system from the official Docker website. Once installed, make sure to add Docker to your system's PATH environment variable so that you can run the Docker command from any directory in your terminal.
docker中:bash: nvidia-smi: command not found
这个问题可能是因为你的docker镜像中没有安装nvidia-smi。你可以在Dockerfile中添加以下命令来安装nvidia-smi:
```
RUN apt-get update && apt-get install -y nvidia-utils
```
如果你的宿主机上已经安装了nvidia驱动,你也可以在运行docker容器时加上以下参数来挂载nvidia驱动:
```
docker run --gpus all ...
```