# This image is based on a python image. # Use of stretch instead of Alpine for faster install of python packages (especially pandas) # Overall performance might be slightly better dut to the use of different lib (but with bigger image size obviously) FROM python:3.7.2-slim-stretch # set work directory WORKDIR /usr/src/app # server dependencies # python3-dev, libpq-dev and gcc is for psycopg2-binary RUN apt-get update && apt-get install -y --no-install-recommends \ libpq-dev \ python3-dev \ gcc \ make \ && rm -rf /var/lib/apt/lists/* # python dependencies RUN pip install --upgrade pip COPY requirements.txt /usr/src/app/requirements.txt RUN pip install -r requirements.txt