Sign inSign up

wolnosciowiec/docker-cron

By wolnosciowiec

•Updated about 8 years ago

Docker + Cron

Image
0

10K+

wolnosciowiec/docker-cron repository overview

⁠Docker image

Docker client + crontab + make + bash Allows to execute scheduled tasks inside other containers by passing access to docker socket.

⁠Instruction
  1. Put your crontab file to the /root/cron by mounting a volume or by adding a file to the container.

    Example crontab file:

    15 3 * * * cd /var/project && make task_clear_cache
    
  2. Run the container granting access to the docker socket

    sudo docker run --rm --name cron -v /var/run/docker.sock:/var/run/docker.sock -v ./cron:/root/cron wolnosciowiec/docker-cron:latest
    
  3. That's all!

Tag summary

Content type

Image

Digest

Size

50.5 MB

Last updated

about 8 years ago

docker pull wolnosciowiec/docker-cron