Skip to content

Instantly share code, notes, and snippets.

@tjstebbing
Created September 5, 2014 00:31
Show Gist options
  • Save tjstebbing/37d8c5c7da681c745a25 to your computer and use it in GitHub Desktop.
Save tjstebbing/37d8c5c7da681c745a25 to your computer and use it in GitHub Desktop.
# This is an example Dockerfile with a proposed docker/CI implementation
# built with a simple helper script to trigger build notifications and 
# a few other handy helpers.

FROM ubuntu:trusty

MAINTAINER Pomke <[email protected]>

#Add docker ci
ADD http://dockerci.github.io/install
RUN ./install

# You can set a non-standard location for CI notifications if self managed
# ENV DHELPER_CI http://ci.example.com

# Inform CI service that we're starting a new build
RUN DCI NOTIFY BEGIN "MyProj/$HOSTNAME"

# install some other updates that share a common base
# by running their Dockerfile commands here
RUN DCI INCLUDE dockerfile/nodejs
RUN DCI INCLUDE pomke/myextrastuff

# Add our code
ADD . /App
WORKDIR /App

# Run some commands and notify CI service with their output
RUN DCI NOTIFY npm install
RUN DCI NOTIFY npm test

# Inform the CI environment that we've finished
RUN DCI NOTIFY SUCCESS 

# Perhaps trigger another build
RUN DCI TRIGGER pomke/production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment