Skip to content

Instantly share code, notes, and snippets.

@x-yuri
Last active February 5, 2023 04:27
docker + cronie

docker + cronie

There's no output unless any debug flag is set. The debug flags are:

  • ext - make other flags more verbose
  • sch - scheduling
  • proc - process control
  • pars - parsing
  • load - database loading
  • misc
  • test - test mode: don't execute any commands
  • bit - make it more verbose while not enabling any other flags?

docker-compose.yml:

services:
  cronie:
    build: .
    command: crond -fx bit

Dockerfile:

FROM alpine:3.17
COPY crontab .
RUN set -x \
    && apk add --no-cache cronie shadow \
    && useradd -m app \
    && crontab -u app crontab

crontab:

* * * * * date >/dev/null 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment