Skip to content

Instantly share code, notes, and snippets.

@alexlovelltroy
Created September 24, 2015 13:13
Show Gist options
  • Save alexlovelltroy/79a1e3672f37bdc0a994 to your computer and use it in GitHub Desktop.
Save alexlovelltroy/79a1e3672f37bdc0a994 to your computer and use it in GitHub Desktop.
A very simple pre-commit hook for continuous docker build
#!/bin/bash
# Add this locally to your repo as .git/hooks/pre-commit and make sure it is executable
# This does not actually get synced when you push to remote
docker build -t "hello_world" . && docker images hello_world && echo "Docker built properly"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment