FROM python:3.5

ENV PYTHONUNBUFFERED 1
MAINTAINER David Rodriguez <davrodri@cs.fiu.edu>

#  * Keep this as one RUN command to ensure that
#    installing packages always trigggers updating the cache
#  * Keep the packages in sorted order
RUN apt-get update -y && apt-get install -y \
    binutils \
    gdal-bin \
    libgdal-dev \
    libproj-dev \
    python3-gdal \
    python-memcache \
&& rm -rf /var/lib/apt/lists/* 	# clean up apt cache

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY requirements.txt /usr/src/app/
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt

COPY . /usr/src/app

CMD ["/bin/bash", "docker-entrypoint.sh"]
