Skip to content
This repository has been archived by the owner on Sep 29, 2018. It is now read-only.

Tiny webserver listening for webhooks to update & restart your running Docker containers with a specified image

License

Notifications You must be signed in to change notification settings

nouchka/docker-puller

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Image Puller

Overview

If you work with docker and continuous integrations tools, you might need to update your images on your servers as soon as your build is finished.

This tool is a tiny webserver listening for a POST and automatically update the specified image using Docker API.

You just have to run the image on your server, and configure your CI tool.

CI tools to make the POST request:

Installation

Launch the image on your server, where the images you want to update are

docker run -d \
  --name dip \
  --env TOKEN=abcd4242 \
  --env REGISTRY_USER=roberto \
  --env REGISTRY_PASSWD=robertopwd \
  -p 8080:8080 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  tuxity/docker-image-puller

Available env variable:

TOKEN*
REGISTRY_USER
REGISTRY_PASSWD
REGISTRY_URL (default: https://index.docker.io/v1/)
HOST (default: 0.0.0.0)
PORT (default: 8080)
DEBUG (default: False)

* mandatory variables. For TOKEN You can generate a random string, it's a security measure.

After, you just have to make a request to the server:

POST http://ipofyourserver/images/pull?token=abcd4242&restart_containers=true&image=nginx:latest

Logs

You can access container logs with

docker logs --follow dip

About

Tiny webserver listening for webhooks to update & restart your running Docker containers with a specified image

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 51.9%
  • Shell 48.1%