# Python Eve DigiLocker Accounts Services
# Build by; Saurabh Kumar Pandey

#FROM registry.digitallocker.gov.in/accounts/cron_runner:base
FROM cron-base:v1
MAINTAINER DigiLocker
LABEL version="1.0"
ENV TZ="Asia/Kolkata"

WORKDIR /opt/cron

#COPY src_code /opt
#COPY app_config /opt/cron
COPY simran.py /opt/cron


COPY dockerconfig/crontab_entries /etc/cron.d/crontab_entries
RUN chmod 755 /etc/cron.d/crontab_entries


RUN crontab -l | { cat; echo "*/1 * * * * echo "job every minute" >>/tmp/cronlog.txt"; } | crontab
RUN crontab -l | { cat; echo "*/1 * * * * /usr/local/bin/python3.8 /opt/cron/simran.py >>/tmp/test.log"; } | crontab


RUN service cron start

CMD ["/usr/bin/supervisord", "-n"]