Sign inSign up

igortimoshenko/docker-cron-job

By igortimoshenko

•Updated almost 11 years ago

Dockerfile of cron-job for Docker's automated build

Image
0

1.0K

igortimoshenko/docker-cron-job repository overview

⁠cron-job Dockerfile

This repository contains Dockerfile of cron-job for Docker⁠'s automated build⁠ published to the public Docker Hub Registry⁠.

⁠Base Docker Image
⁠Installation
  1. Install Docker⁠.

  2. Download automated build⁠ from public Docker Hub Registry⁠: docker pull igortimoshenko/docker-cron-job

    (alternatively, you can build an image from Dockerfile: docker build -t="igortimoshenko/docker-cron-job" github.com/igortimoshenko/docker-cron-job)

⁠Usage

Start container specifying the executable script for cron:

docker run -d \
-v `<script-dir>`/script.sh:/root/script.sh \
-e CRON_JOB='* * * * * ~/script.sh >> /var/log/script.log 2>&1' \
igortimoshenko/docker-cron-job

Note that if you need environment variables within your cron script then include the following line source /root/.env-vars in your script

Tag summary

Content type

Image

Digest

Size

62.7 MB

Last updated

almost 11 years ago

docker pull igortimoshenko/docker-cron-job