FROM python:3.7-slim
# We copy just the requirements.txt first to leverage Docker cache
COPY requirements.txt /src/requirements.txt
WORKDIR /src
RUN pip install --upgrade pip && pip3 install -r requirements.txt
COPY src/. /src
COPY entrypoint.sh .
RUN ["chmod", "+x", "/src/entrypoint.sh"]
ENTRYPOINT ["/src/entrypoint.sh"]