I'm quite new to networking and server management so thank you in advance for your patience.
Currently I am learning how to build a docker image on AWS's Cloud9.
The tutorial I'm following is from AWS themselves and is named MythicalMysfits which is meant to walk a new user through the main tools used on AWS to build a modern web application.
I'm currently on step 2, building a dynamic website:
When I run the following command:
docker build . -t REPLACE_ME_AWS_ACCOUNT_ID.dkr.ecr.REPLACE_ME_REGION.amazonaws.com/mythicalmysfits/service:latest
I of course replace the two parts necessary with my account ID and region.
It prompts another file Named "Dockerfile" containing the following commands to be run:
FROM ubuntu:latest
RUN echo Updating existing packages, installing and upgrading python and pip.
RUN apt-get update -y
RUN apt-get install -y python-pip python-dev build-essential
RUN pip 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 pip install -r ./requirements.txt
RUN echo Starting python and starting the Flask service...
ENTRYPOINT ["python"]
CMD ["mythicalMysfitsService.py"]
At this point the code begins to run, however fails:
Sending build context to Docker daemon 14.85kB
Step 1/13 : FROM ubuntu:latest
---> 1d622ef86b13
Step 2/13 : RUN echo Updating existing packages, installing and upgrading python and pip.
---> Using cache
---> d5aa972842ca
Step 3/13 : RUN apt-get update -y
---> Using cache
---> 56374a45d258
Step 4/13 : RUN apt-get install -y python-pip python-dev build-essential
---> Running in 3ce71d802d94
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package python-pip
The command '/bin/sh -c apt-get install -y python-pip python-dev build-essential' returned a non-zero code: 100
I understand that external to this document, apt-get does not work in Cloud9's IDE so I managed to install the python packages manually using sudo yum. I've spend a few hours over two days now trying to figure it out. I'm also in the correct directory as the tutorial advises.
Do you have any idea as to why the "Dockerfile" is misbehaving?
I thank you again for your time.