FROM alpine:3.7

LABEL author=AleksanderPiotrowski

COPY ./image/repositories /etc/apk/repositories
COPY ./image/bin /usr/local/bin

RUN apk update && apk add postgresql-dev \
      gcc \
      python3-dev \
      musl-dev \
      py-gunicorn \
      py-pillow \
      libgcc \
      jpeg-dev \
      freetype-dev \
      zlib-dev \
      openjpeg-dev \
      tiff-dev \
      tk-dev \
      tcl-dev \
      g++ \
      bash

RUN apk add --no-cache --virtual .crypto-rundeps --repository http://dl-cdn.alpinelinux.org/alpine/edge/main libressl2.7-libcrypto
RUN apk add gdal@testing gdal-dev@testing

COPY ./requirements.txt ./
RUN pip3 install -r requirements.txt

WORKDIR /app/src

VOLUME ["/app/src"]

WORKDIR /app/src

VOLUME ["/app/src"]

EXPOSE 8000
