Skip to content

NerdCats/NerdCats.DockerPull

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NerdCats.DockerPull Build Status

Automatic Docker Deployment using WebHooks

Docker hook is a very simple node.js app that listens to your http requests and triggers your specified command.

Features

  • Lightweight, runs on express
  • Dumb, simple authentication
  • Simple to set up

Steps to get it working

  • Clone the repo
  • npm install
  • gulp clean
  • gulp build
  • npm start

To change the auth token, please modify src/config.json before hosting.

To invoke a docker pull

By default the service listens to port 3000. Send a post request like the following to /pull, (this is for a sample nginx:latest docker image)

{
	"mode": "docker",
	"image": "nginx:latest",
	"arguments": "-p 5000:80"
}

make sure you add the token query parameter with your defined auth_token in the config.json

Essentially it will execute a simple bash file inside src/commands folder. You can customize the repo further for your purpose. i.e. any bash file and other things you need in case of your deployment.

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 83.8%
  • JavaScript 13.2%
  • Shell 3.0%