Could not build docker image
Opened this issue ยท 5 comments
It kept crashing at:
"RUN apt-get install -y python-pip python-dev build-essential"
I changed it to:
"RUN apt-get install -y python3 python3-setuptools python3-pkg-resources
python3-pip python3-dev libffi-dev build-essential git
RUN apt install -y python3-pip"
Then used pip3 and it ran ok
It then crashed at the next step as I think the entry point of Python does not work now
This step is a hard-stop for this tutorial. These commands will not execute on the Cloud9 environment.
I had the same problem and fixed changing the line 1 to:
FROM ubuntu:18.04
I found the answer in: https://stackoverflow.com/questions/61564756/install-python-pip-using-apt-get-via-ubuntus-apt-get-in-dockerfile
I had the same problem and fixed changing the line 1 to:
FROM ubuntu:18.04
I found the answer in: https://stackoverflow.com/questions/61564756/install-python-pip-using-apt-get-via-ubuntus-apt-get-in-dockerfile
This worked for me as well.
Dockerfile needs to be updated. Here's my copy that worked on the Cloud9 environment:
FROM ubuntu:latest
RUN echo Updating existing packages, installing and upgrading python and pip.
RUN apt-get update -y &&
apt-get install -y software-properties-common &&
apt-add-repository universe &&
apt-get update -y &&
apt-get install -y python3-pip python-dev build-essential
RUN pip3 install --upgrade pip
RUN echo Copying the Mythical Mysfits Flask service into a service directory.
COPY ./service /MythicalMysfitsService
WORKDIR /MythicalMysfitsService
RUN echo Installing Python packages listed in requirements.txt
RUN pip3 install -r ./requirements.txt
RUN echo Starting python and starting the Flask service...
ENTRYPOINT ["python3"]
CMD ["mythicalMysfitsService.py"]