FROM python:3.8
MAINTAINER DigiLocker-Alok
LABEL version="1.0"
ENV TZ="Asia/Kolkata"
RUN pip install -U flask flask-cors pyjwt pycryptodome python-dotenv redis-py-cluster pika requests pymongo bcrypt uuid

RUN apt-get update
RUN apt-get install -y supervisor
RUN apt-get install debian-keyring debian-archive-keyring apt-transport-https curl lsb-release -y
RUN curl -sL 'https://deb.dl.getenvoy.io/public/gpg.8115BA8E629CC074.key' |  gpg --dearmor -o /usr/share/keyrings/getenvoy-keyring.gpg
RUN echo a077cb587a1b622e03aa4bf2f3689de14658a9497a9af2c427bba5f4cc3c4723 /usr/share/keyrings/getenvoy-keyring.gpg | sha256sum --check
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/getenvoy-keyring.gpg] https://deb.dl.getenvoy.io/public/deb/debian $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/getenvoy.list
RUN apt-get update
RUN apt-get install -y net-tools
RUN apt-get install -y procps
RUN apt-get install -y getenvoy-envoy
RUN apt-get install -y gcc

RUN mkdir -p /etc/supervisord.d

EXPOSE 80
CMD ["/usr/bin/supervisord", "-n"]