Skip to content

A simple ExpressJS-based script which can be used to listen to Docker Hub webhooks in order to perform actions, like pulling the new docker image and restarting a container

Notifications You must be signed in to change notification settings

grmanit/docker-hub-webhooks-listener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-hub-webhooks-listener

A simple ExpressJS-based script which can be used to listen to Docker Hub webhooks in order to perform actions, like pulling the new docker image, restarting a container or performing any other actions.

The script is written in TypeScript so you'll need to install typescript (npm install -g typescript) in order to compile it to JavaScript.

Configure the script by changing config.ts where you can already find a sample configuration. Afterwards run

tsc --module commonjs app.ts

to compile it to JavaScript.

To Run the script

  1. Install typescript: npm install -g typescript
  2. Update config.ts with your personal configuration of webhooks
  3. Compile the typescript files: tsc --module commonjs app.ts
  4. Install missing dependencies: npm install
  5. Run it: node .
  6. To start the script when your server starts, you can use something like https://github.com/chovy/node-startup

About

A simple ExpressJS-based script which can be used to listen to Docker Hub webhooks in order to perform actions, like pulling the new docker image and restarting a container

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published