Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

Utilze docker exec to run commands on yaml base config

Project Description

docker-tasks

docker-tasks is a tool for executing periodic tasks via docker exec. It is looking up for running docker images and execute the specified commands in the matching container

An use case could be to dump all PostgreSQL based images to the container related volume. This allow me to backup /var/lib/docker/volumes/ with a pg_dump generated database dump inside my volumes.

Installation

pip install docker-tasks

Create a docker-tasks.yml with example commands

images:
    ubuntu:
      '*':
        - ps aux

    postgres:
      '9.*':
        - /bin/sh -c "pg_dump -U postgres postgres > /var/lib/postgresql/data/db_backup_$(date +%u).sql"

Usage

usage: docker-tasks [-h] [-c CONFIG] [-v]

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        Config yaml. Default (docker-tasks.yml)
  -v, --verbose         Increase output verbosity
Release History

Release History

This version
History Node

0.0.3

History Node

0.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
docker-tasks-0.0.3.tar.gz (3.1 kB) Copy SHA256 Checksum SHA256 Source Nov 20, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting