So my dockerfile is :
FROM iron/python:2.7
WORKDIR /app
ADD . /app
RUN pip install --upgrade pip
RUN pip install -r ./requirements.txt
Re
For Python3:
FROM ubuntu:latest
WORKDIR /app
ADD . /app
RUN set -xe \
&& apt-get update \
&& apt-get install python3-pip
RUN pip3 install --upgrade pip
RUN pip3 install -r requirements.txt
Thats it :-)
You have to install pip first.
FROM iron/python:2.7
WORKDIR /app
ADD . /app
RUN set -xe \
&& apt-get update \
&& apt-get install python-pip
RUN pip install --upgrade pip
RUN pip install -r ./requirements.txt