0

I was using the below docker file for quite sometime it was working well, But today when i tried to build the image it is throwing that pip is not installed, even though it is installed in the previous step

/bin/sh: 1: pip: not found The command '/bin/sh -c pip install setuptools wheel' returned a non-zero code: 127

Below is the text of Dockerfile till the point where the error occurred:

FROM openjdk:8-jdk-slim
LABEL maintainer="abc@ab.com"

ARG RELEASE=2.13.2
ARG UID=1000
ARG GID=1000

RUN apt-get update
RUN apt-get install --no-install-recommends -y

RUN apt-get install tzdata -y
RUN apt-get install nano -y
RUN apt-get install curl -y
RUN apt-get install vim -y
RUN apt-get install python3 -y
RUN apt-get install python3-pip -y
RUN apt-get install unzip -y
RUN ln -s `which python3` /usr/bin/python
RUN pip3 install --upgrade pip
RUN pip install setuptools wheel
RUN pip install Flask flask-swagger-ui requests
RUN apt-get install --reinstall procps -y

I am not sure what happened suddenly , my attempt into looking for similar issues didn't yield a reason so for :

Docker issue: /bin/sh: pip: not found Install pip in docker Docker Build can't find pip

deepakguna
  • 145
  • 3
  • 16
  • 1
    You used `pip` instead of `pip3` the second time. – Joseph Sible-Reinstate Monica Apr 25 '20 at 04:56
  • @JosephSible-ReinstateMonica This used to work for two months , until today morning – deepakguna Apr 25 '20 at 05:30
  • @JosephSible-ReinstateMonica seems like some ssl change happened at my org. using pip3 with trusted host resolved the issue. RUN pip3 install --trusted-host=pypi.org --trusted-host=files.pythonhosted.org --user Flask flask-swagger-ui requests. Thank you! But i am still unclear why pip stopped working from today. – deepakguna Apr 25 '20 at 05:53

0 Answers0