# Use an official Python runtime as a parent image
FROM python:3.7-alpine

# Install Python support for uWSGI
RUN apk update \
    && apk add --no-cache libressl-dev libffi-dev musl-dev linux-headers gcc libc-dev python3-dev \
    && rm -rf /var/cache/apk/*

# Copy pip configs for private repo
RUN mkdir -p /root/.config/pip/
COPY configs/pip.conf /root/.config/pip/
COPY configs/.pypirc /root/

# Set the working directory to /app
WORKDIR /app

# Copy requirements
COPY ./requirements /app/requirements

# Install any needed packages specified in requirements.txt
RUN pip install --upgrade pip setuptools \
    && pip install --trusted-host pypi.python.org -r requirements/dev.pip

# Copy the current directory contents into the container at /app
COPY . /app
