Windows 10 "executor failed running..."上的码头工人构建错误



如何解决这个问题?(python-telegram-bot…Pyvirtualdisplays)已手动安装,但仍然发生这种情况…

PS C:UsersASUS PCDocumentsGitHubTelegram-moodle-notification-bot> docker build -t nugas-bot .
[+] Building 3.0s (12/12) FINISHED
=> [internal] load build definition from Dockerfile                                                                                                                   0.0s
=> => transferring dockerfile: 32B                                                                                                                                    0.0s
=> [internal] load .dockerignore                                                                                                                                      0.0s
=> => transferring context: 2B                                                                                                                                        0.0s
=> [internal] load metadata for docker.io/library/fedora:latest                                                                                                       2.5s
=> [internal] load build context                                                                                                                                      0.0s
=> => transferring context: 2.05kB                                                                                                                                    0.0s
=> [1/8] FROM docker.io/library/fedora@sha256:9d71386ce04de67b68519d55ca3926cb960a7768d631e6d215eca69b6bb7c2a3                                                        0.0s
=> CACHED [2/8] RUN sudo dnf -y update &&     sudo dnf -y install make wget gcc firefox Xvfb                                                                          0.0s
=> CACHED [3/8] RUN wget http://download.redis.io/redis-stable.tar.gz &&     tar xvzf redis-stable.tar.gz &&     sudo make install -C redis-stable                    0.0s
=> CACHED [4/8] RUN wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz &&     tar -xvzf geckodriver* &&     ch  0.0s
=> CACHED [5/8] RUN useradd -ms /bin/bash moodle                                                                                                                      0.0s
=> CACHED [6/8] ADD . /usr/local/bin/                                                                                                                                 0.0s
=> CACHED [7/8] RUN chmod a+x /usr/local/bin/entry-point.sh                                                                                                           0.0s
=> ERROR [8/8] RUN pip3 install python-telegram-bot redis selenium walrus pyvirtualdisplay                                                                            0.4s
> [8/8] RUN pip3 install python-telegram-bot redis selenium walrus pyvirtualdisplay:
#12 0.374 /bin/sh: line 1: pip3: command not found
executor failed running [/bin/sh -c pip3 install python-telegram-bot redis selenium walrus pyvirtualdisplay]: exit code: 127

我已经安装了pip3和python

PS C:UsersASUS PCDocumentsGitHubTelegram-moodle-notification-bot> python -V
Python 3.8.0
PS C:UsersASUS PCDocumentsGitHubTelegram-moodle-notification-bot> pip3 -V
pip 21.3 from c:usersasus pcappdatalocalprogramspythonpython38libsite-packagespip 
(python 3.8)

Blockquote

你已经在你的计算机上安装了Pythonpip,但不是在你的docker容器上,docker容器基本上作为一个单独的虚拟操作系统,你需要在docker中安装pythonpip

要做到这一点,在调用RUN pip3 install ...之前将这行添加到Dockerfile

RUN apt-get -y install python3-pip

相关内容

  • 没有找到相关文章

最新更新