FROM ubuntu:16.04
# Install cron
RUN apt-get update
RUN apt-get install -y cron
# Create the log file to be able to run tail
RUN touch /var/log/cron.log
# Run the command on container startup
CMD cron && tail -f /var/log/cron.log
# Print "Hello" every minute
RUN echo '* * * * * root echo "Hello" >> /var/log/cron.log 2>&1' > /etc/cron.d/crontab
Content type
Image
Digest
Size
73.1 MB
Last updated
almost 9 years ago
docker pull jarnstedt/cron:v1