Skip to content
Simple task scheduling for Docker jobs
JavaScript Makefile Dockerfile
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
dockerfiles
dockron
example
scripts
.dockerignore
.editorconfig
.eslintignore
.eslintrc.js
.gitignore
.prettierrc
LICENSE
Makefile
README.md
package-lock.json
package.json

README.md

🐳 Dockron

Simple task scheduling for Docker jobs

🚀 Features

  • Cron Syntax. Powerful, explicit scheduling.
  • Logging. Comprehensive logging built-in.
  • Simple. Easy to install, configure, and deploy.

🔨 Installation

You can install and run dockron using either locally with npm:

npm i -g dockron

Or by running in Docker (recommended):

docker pull andrewsosa/dockron

💻 Usage

Usage: dockron [options]

Options:
  -h --help             Show this.
  -v --validate         Validate config file only.
  -c --config=<config>  Choose config file [default: /etc/dockron/dockron.toml]
  -s --socket=<socket>  Choose Docker socket [default: /var/run/docker.sock]
  -d --debug            Print the argument object (for debugging).
  -l --level            Set logging level [default: 'info']

🐳 Running with Docker

If running inside a Docker container, you will need to mount both a configuration file and the Docker socket.

docker run -v /var/run/docker.sock:/var/run/docker.sock \
           -v ./path/to/dockron.toml:/etc/dockron/dockron.toml \
           andrewsosa/dockron

Alternatively, you can build your own image to add the config:

FROM andrewsosa/dockron
COPY ./path/to/dockron.toml /etc/dockron/dockron.toml

📒 Configuration

dockron expects a configuration at /etc/dockron/dockron.toml, but you can change that with --config.

["Sample Task Name"]
schedule = "* * * * *"
image = "alpine"
command = "sleep 10"

["Hourly Task"]
schedule = "0 * * * *"
image = "ubuntu"
command = "echo 'Hello, world\!'"
network = "my_network"

🚗 Roadmap

  • Choosing a container name in dockron.toml
  • Allowing multiple networks in dockron.toml
  • Add environment variable interpolation (v0.2.0)
  • Add Docker event streaming (e.g. container exit)
You can’t perform that action at this time.