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

# 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 /app/requirements

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

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

CMD ["python3", "index.py"]
