The content of the written Dockerfile is: FROM python:3.6.8 RUN pip install --upgrade pip WORKDIR /code ADD ./code RUN pip install -r requirements.txt ENTRYPOINT ["pytest"] When executing the image creation to RUN pip install --upgrade pip, it reports /bin/sh: pip: command not found, and it is found that pip cannot be found: It is found that the called image cannot find the pip command. Here is my solution: I directly deleted the image I originally called, and then rebuilt it, and downloaded the image again. At this time, I can docker rmi -f python:3.6.8 docker build -t python_pytest:v1 . I also checked some information online. Most of the suggestions were to install pip in the image or write the installation command in the dockerfile. I tried both of them and found that there were still other pitfalls. Finally, I found that directly deleting the image and re-downloading it was the fastest solution. I hope it can help everyone. This is the end of this article about how to solve the problem of /bin/sh: pip: command not found during dockerfile build. For more information about dockerfile build reporting /bin/sh, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: How to use CSS attribute selectors to splice HTML DNA
>>: JavaScript imitates Jingdong magnifying glass special effects
Install MySQL under Windows for your reference. T...
After studying React for a while, I want to put i...
What is the difference between the green version ...
1. Download the alpine image [root@DockerBrian ~]...
This article shares the specific code of JavaScri...
Table of contents 1. Introduction to sysbench #Pr...
Table of contents forEach() (ES6) method map() (E...
Table of contents Multi-application deployment 1-...
Table of contents Preface Example summary Preface...
Table of contents 1. What is componentization? 2....
Data backup and restore part 3, details are as fo...
If we introduce the nesting rules of basic HTML w...
1.html <div class="loginbody"> &l...
Quickstart Guide The Foreman installer is a colle...
Events can specify the execution of SQL code once...