FROM ubuntu:21.04

ENV DEBIAN_FRONTEND noninteractive


COPY creds/servicebruker.sh /creds/
COPY creds/worker.key /ssl/private/
COPY creds/worker.crt /ssl/cert/worker.crt


RUN apt update
RUN apt upgrade
RUN apt-get -y install python3-pip

RUN pip3 install waitress
RUN pip3 install redis
RUN pip3 install celery
RUN pip3 install Flask
RUN pip3 install python-openstackclient
RUN pip3 install python-logging-loki
RUN pip3 install flask-cors
RUN pip install hupper


CMD . /creds/servicebruker.sh && rm /creds/servicebruker.sh && cd /source && hupper -m waitress --port=8080 app:app
