🐳 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
🐳 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/dockronCOPY ./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)