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
Table of contents specification a. The page file ...
This article example shares the specific code of ...
When we open the source code of a regular website...
Table of contents Preface 1. Use $attrs and $list...
1. dhtmlxTree dHTMLxTree is a feature-rich Tree M...
Based on the Vue image magnifier component packag...
Today I will introduce two HTML tags that I don’t...
This article uses examples to illustrate the prin...
React is an open-source JavaScript library used b...
Flash enabled designers and developers to deliver...
What is pip pip is a Python package management to...
I have been working on a project recently - Budou ...
In the vertical direction, you can set the cell a...
Here we introduce the centos server with docker i...
<br />Preface: Before reading this tutorial,...