Sign inSign up

wpalmer/webhook

By wpalmer

Updated about 8 years ago

variations on the almir/webhook Docker image ( https://hub.docker.com/r/almir/webhook/ )

Image
1

10K+

wpalmer/webhook repository overview

Webhook, Dockerized, with Docker, for ad-hoc Docker Image builds

A combination of the official docker image, the webhook image, and the vdocker script.

This should be all you need to piece together a basic ad-hoc build system.

The aws tag is a combination of the webhook and the aws command-line interface, without docker, for when all you need is to trigger an AWS API call (such as an SNS notification, or a CloudFormation stack update) via a webhook.

Example:

invocation

docker run \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v $PWD/webhook:/etc/webhook \
    -v $PWD/git:/git-cache \
    -v $PWD/id_rsa:/id_rsa \
    -d wpalmer/webhook:docker \
    -verbose -hooks=/etc/webhook/hooks.json -hotreload

example hook script

#!/bin/sh
GIT_URL="$1"
GIT_REF="$2"
GIT_COMMIT="$3"
GIT_DIR=/git-cache
GIT_SSH_COMMAND='ssh -i /id_rsa'
BUILD_DIR=/build-$GIT_COMMIT

export GIT_DIR GIT_SSH_COMMAND
mkdir -p $BUILD_DIR &&
git init &&
git fetch "$GIT_URL" "$GIT_REF" &&
git archive "$GIT_COMMIT:" | tar -x -C $BUILD_DIR &&
docker build $BUILD_DIR
rm -rf "$BUILD_DIR"

Tag summary

Content type

Image

Digest

Size

55.4 MB

Last updated

about 8 years ago

docker pull wpalmer/webhook