Skip to content

Instantly share code, notes, and snippets.

@x-yuri
Last active February 5, 2023 04:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save x-yuri/ddbf1cd7226d54da7c7e868c3ba5ba12 to your computer and use it in GitHub Desktop.
Save x-yuri/ddbf1cd7226d54da7c7e868c3ba5ba12 to your computer and use it in GitHub Desktop.
docker + fcron

docker + fcron

Use -d to make it more verbose.

docker-compose.yml:

services:
  fcron:
    build: .
    command: fcron -f

Dockerfile:

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

crontab:

* * * * * date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment