Docktor fixes other Docker containers - AGPL license, commercial license available.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 4a5d82b Sep 2, 2015
Permalink
Failed to load latest commit information.
root Build improvements Jul 15, 2015
.gitignore Initial work Jul 15, 2015
Dockerfile Update Dockerfile Aug 3, 2015
LICENSE Update LICENSE Jul 15, 2015
README.md Update README.md Sep 2, 2015
build.sh Build improvements Jul 15, 2015
docker-compose-test.yml Build improvements Jul 15, 2015
docker-compose.yml Initial work Jul 15, 2015
tutum.yml Update tutum.yml Sep 2, 2015

README.md

Docktor

Join the chat at https://gitter.im/sillelien/docktor

Docktor fixes other containers, it is a sidecar container which takes actions when it's companion(s) fail(s).

Get it on Docker Hub: https://registry.hub.docker.com/u/sillelien/docktor

Introduction

The Docktor checks every CHECK_INTERVAL (default 60) seconds whether the containers it links to are still active using the command supplied.

The linked containers have the environmental variables set on them: CHECK_COMMAND and FIX_COMMAND. CHECK_COMMAND will be passed to a Bash shell for evaluation, if it exits with zero (success) then nothing happens, if it exits with non-zero (fail) then FIX_COMMAND is executed to try and fix the problem. Usually this will be just to restart a container etc.

Docktor comes with a set of scripts to make your life easier they are in /scripts/checks and /scripts/fixes - if you want to add, please issue a pull request with the scripts added to the appropriate subdirectory.

An example tutum.yml is shown below and can be deployed by the button after it.

docktor:
  image: sillelien/docktor
  links:
    - test
  roles:
    - global

test:
  image: nginx
  environment:
    CHECK_COMMAND: "curl http://${TEST_PORT_80_TCP_ADDR}:{TEST_PORT_80_TCP_PORT} | grep nginx.com"
    FIX_COMMAND: "/scripts/fixes/tutum_restart.sh ${TEST_TUTUM_API_URL}"

Deploy to Tutum

This checks to see if the Nginx server is running on port 80, if not it runs a pre-supplied script that restarts the container on Tutum.

Additional Commands and Resources

Additional resources to a usual Docker Alpine image include the following: curl, nmap, socat, (netcat), Bash, Docker, Python, Pip. As well as these CLIs for the following services are include: Tutum, Digital Ocean, Amazon Web Services. If you have suggestions for other CLIs please let me know.

Docker Registry

GitHub License

GitHub Issues

GitHub Release

Image Layers