mirror of
https://github.com/shabbirkagalwala/CentOS-Cron-Docker.git
synced 2021-05-12 18:32:11 +03:00
Commit
This commit is contained in:
19
Dockerfile
Normal file
19
Dockerfile
Normal 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
|
||||
Reference in New Issue
Block a user