Code Monkey home page Code Monkey logo

dockerhub-webhook-listener's Introduction

dockerhub-webhook-listener

Simple Docker Hub webhook endpoint that runs a deploy script upon request

Usage

This app consists of an http-kit server that listens for incoming requests on port 8080.

It checks:

  1. That the request came from Docker Hub servers between 162.242.195.64 and 162.242.195.127
  2. The token query parameter in the request matches the DOCKERHUB_TOKEN environment variable

If these checks pass, it executes a shell script in the container at /dockerhub-webhook-listener/rsc/deploy.sh (if available)

Docker is included in the image, so if you mount the Docker socket when running the container, you will have access to the host Docker daemon & can issue Docker commands from within deploy.sh.

Example showing shell script & docker socket mount:

docker pull zoondka/dockerhub-webhook-listener
docker run -d -p 8080:8080 \
           -v /path/to/dockerhub-webhook-listener/rsc:/dockerhub-webhook-listener/rsc \
           -v /var/run/docker.sock:/var/run/docker.sock --name dockerhub-webhook-listener \
           -e DOCKERHUB_TOKEN=$TOKEN \
           zoondka/dockerhub-webhook-listener

dockerhub-webhook-listener's People

Contributors

leblowl avatar

Watchers

 avatar  avatar

Forkers

justindirose

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.