How to install python3 and python pip in docker

In this article let’s discuss about How to install python3 and python pip in docker. Let’s go through the following methods without any delay.

Method 1:

Create Dockerfile : 

FROM python:3-alpine

RUN python -m pip install --upgrade pip

RUN pip3 install requests paho-mqtt

COPY NumSide.py /home/mehdi/Download/NumSide.py

CMD ["python","/home/mehdi/Download/NumSide.py"]

Hope the above solution works.

Realted Posts : Files changed in a commit