13 lines
290 B
Docker
13 lines
290 B
Docker
# Dockerfile to create image with cron services
|
|
FROM ubuntu:latest
|
|
|
|
# Install Cron
|
|
RUN apt-get update \
|
|
&& apt-get -y install cron \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN useradd test
|
|
|
|
# Run the command on container startup
|
|
CMD crontab -u test /home/test/cron/crontab-file && cron -f
|