FROM registry.yandex.net/mail/mail-base-focal:latest

RUN curl -s https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py && \
    python2 get-pip.py && rm get-pip.py && \
    pip install requests && \
    rm -rf /etc/monrun/conf.d && \
    pip install -i https://pypi.yandex-team.ru/simple requests

COPY deploy /

RUN chmod 644 /etc/cron.d/* && \
    chmod 755 /usr/share/qnductor/monrun/* && \
    chown monitor:monitor /var/run/juggler-client && \
    touch /var/log/monrun.log && \
    chown monitor:monitor /var/log/monrun.log

CMD ["supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]
