Wondering what’s next for npm?Check out our public roadmap! »

dockron

0.2.1 • Public • Published

🐳 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)

Install

npm i dockron

DownloadsWeekly Downloads

2

Version

0.2.1

License

MIT

Unpacked Size

16 kB

Total Files

25

Last publish

Collaborators

  • avatar