Skip to main content

autodock is a Daemon for Docker Automation.

autodock is MIT licensed.

Installation

Either pull the automatically updated Docker image:

$ docker pull prologic/autodock

Or install from the development repository:

$ git clone https://github.com/prologic/autodock.git
$ cd autodock
$ pip install -r requirements.txt

Plugins

autodock comes with a number of plugins where each piece of functionality is provided by a separate plugin. Each plugin is “linked” to autodock to receive Docker events and issue new Docker API commands. The following list is a list of the currently available plugins for production use:

Example #1 – Logging Docker Events

Start the daemon:

$ docker run -d -v /var/run/docker.sock:/var/run/docker.sock --name autodock:autodock prologic/autodock

Link and start an autodock plugin:

$ docker run -i -t --link autodock prologic/autodock-logger

Now whenever you start a new container autodock will listen for Docker events. The autodock-logger plugin will log all Docker Events received by autodock.

Example #2 – Automatic Virtual Hosting with hipache

Start the daemon:

$ docker run -d --name autodock prologic/autodock

Link and start an autodock plugin:

$ docker run -d --link autodock prologic/autodock-hipache

Now whenever you start a new container autodock will listen for Docker events and discover containers that have been started. The autodock-hipache plugin will specifically listen for starting containers that have a VIRTUALHOST environment variable and reconfigure the running hipache container.

Start a “Hello World” Web Application:

$ docker run -d -e VIRTUALHOST=hello.local prologic/hello

Now assuming you had hello.local configured in your /etc/hosts pointing to your hipache container you can now visit http://hello.local/

echo "127.0.0.1 hello.local" >> /etc/hosts
curl -q -o - http://hello.local/
Hello World!

Example #3 – Cron-like Scheduling of Containers

Start the daemon:

$ docker run -d --name autodock prologic/autodock

Link and start an autodock plugin:

$ docker run -d --link autodock prologic/autodock-cron

Now whenever you create a new container autodock will listen for Docker events and discover containers that have been created. The autodock-cron plugin will specifically listen for created containers that have a CRON environment variable and schedule a job based on the cron expression supplied and re-run that container when its scheduled has triggered.

Start a “Hello” Busybox Container:

$ docker run -i -t --name hello busybox sh -c "echo Hello"

After about three minutes or so you should see the following in the logs:

$ docker logs hello
Hello
Hello
Hello

Metadata

Release files for autodock 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autodock 0.0.2
File Size Uploaded
autodock-0.0.2.tar.gz 8.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for autodock 0.0.2
File Interpreter ABI Platform
autodock-0.0.2-py2-none-any.whl Python 2 none any Details

Total release size: 20.4 kB

Release files / autodock-0.0.2.tar.gz

Download URL autodock-0.0.2.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
eae631ac3fca190f24fca80132a5312cf108f8c0c7ea174f1b3a52f8b7c3c714
BLAKE2b-256 checksum
How to use checksums
416af044707f9e86635e3af54719999def12816972cd27cd68dc2af8df85d0ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / autodock-0.0.2-py2-none-any.whl

Download URL autodock-0.0.2-py2-none-any.whl
Size 12.0 kB
Tags Python 2
SHA-256 checksum
How to use checksums
397f62ea60c45da2ea3e075ef536f218e676a84df1ca2a1c37b311383dab154c
BLAKE2b-256 checksum
How to use checksums
90dfcfd2ce1344f47266ee1f46a3f7319f819d03f8655fee2fc7eb80ca77a8a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page