Alpine-based image to facilitate automated backups via crontab. It's meant to be used by binding a file containing your crontab config, as well as any scripts you may need to run.
Simply create a local file containing you job(s) and bind it to /crontab. See the usage example below.
By default the image will run as user 1000:1000 with the username cronuser. This can be customized by passing environment values.
| Env | Description | Default |
|---|---|---|
| CRON_USER | User for the cron user | cronuser |
| CRON_UID | UID for the cron user | 1000 |
| CRON_GID | GID for the cron user | 1000 |
To run the image with the default setup:
docker run -it --rm \
-v /path/to/crontab:/crontab \
docker-backup-cron
Here is an example that will override the cron user details and run the container with the same timezone as the host:
docker run -it --rm \
-e CRON_USER=myuser \
-e CRON_UID=1001 \
-e CRON_GID=1001 \
-v /path/to/crontab:/crontab \
-v /etc/localtime:/etc/localtime:ro \
docker-backup-cron
This image provides the following tools:
The entrypoint.sh script that powers this image was adapted from theohbrothers/docker-alpine-cron.
Content type
Image
Digest
sha256:453d84950…
Size
38.8 MB
Last updated
over 1 year ago
docker pull w33ble/docker-backup-cron