docker
+ dcron
Use -l loglevel
or -d
to make it more verbose. The log levels are:
emerg
(panic
)alert
crit
err
(error
)warning
(warn
)notice
info
debug
docker-compose.yml
:
services:
dcron:
build: .
command: crond -fl info
init: yes
Dockerfile
:
FROM alpine:3.17
RUN set -x \
&& apk add --no-cache dcron shadow \
&& useradd -m app
COPY crontab /etc/crontabs/app
crontab
:
* * * * * date >/dev/null 2>&1