Sign inSign up

w33ble/docker-backup-cron

By w33ble

•Updated over 1 year ago

Image
0

2.5K

w33ble/docker-backup-cron repository overview

⁠docker-backup-cron

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.

EnvDescriptionDefault
CRON_USERUser for the cron usercronuser
CRON_UIDUID for the cron user1000
CRON_GIDGID for the cron user1000

⁠Usage

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

⁠Applications

This image provides the following tools:

  • sudo
  • bash
  • curl
  • openssh client
  • rsync
  • rclone
⁠Credits

The entrypoint.sh script that powers this image was adapted from theohbrothers/docker-alpine-cron⁠.

Tag summary

Content type

Image

Digest

sha256:453d84950…

Size

38.8 MB

Last updated

over 1 year ago

docker pull w33ble/docker-backup-cron