This commit is contained in:
shabbir kagalwala
2017-08-10 14:41:49 -05:00
commit 54aacb2238
2 changed files with 25 additions and 0 deletions

19
Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
FROM centos:latest
MAINTAINER skagalwala
# install crontabs
RUN yum -y update
RUN yum -y install crontabs
# comment out PAM
RUN sed -i -e '/pam_loginuid.so/s/^/#/' /etc/pam.d/crond
#Add your cron file
ADD cron /etc/cron.d/cron_test
RUN chmod 0644 /etc/cron.d/cron_test
#This will add it to the cron table (crontab -e)
RUN crontab /etc/cron.d/cron_test
CMD crond && tail -f /dev/null

6
cron Normal file
View File

@@ -0,0 +1,6 @@
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
* * * * * echo "hello" >> /hello.txt
#empty line