Dockerfile 695 Bytes
Newer Older
1 2
# This image is based on a python image.

Florent Chehab's avatar
Florent Chehab committed
3
# Use of stretch instead of Alpine for faster install of python packages (especially pandas)
4
# Overall performance might be slightly better dut to the use of different lib (but with bigger image size obviously)
Florent Chehab's avatar
Florent Chehab committed
5 6 7 8 9
FROM python:3.7.2-slim-stretch

# set work directory
WORKDIR /usr/src/app

10 11
# server dependencies
# python3-dev, libpq-dev and gcc  is for psycopg2-binary
Florent Chehab's avatar
Florent Chehab committed
12 13 14 15 16 17 18 19
RUN apt-get update && apt-get install -y --no-install-recommends \
		libpq-dev \
		python3-dev \
		gcc \
		make \
	&& rm -rf /var/lib/apt/lists/*


20
# python dependencies
Florent Chehab's avatar
Florent Chehab committed
21 22 23
RUN pip install --upgrade pip
COPY requirements.txt /usr/src/app/requirements.txt
RUN pip install -r requirements.txt