FROM python:3-alpine

RUN apk update \
  && apk add --virtual build-deps gcc python3-dev musl-dev \
  && apk add postgresql-dev libffi-dev openssl-dev \
  && pip install psycopg2 \
  && pip install cryptography==1.4 \
  && apk del build-deps

RUN apk add curl

COPY ./requirements-tester.txt .
RUN pip install -r requirements-tester.txt

RUN mkdir /tests

COPY ./entrypoint-tester.sh /tests/entrypoint.sh

WORKDIR /tests

CMD ./entrypoint.sh