Public Repository

Last pushed: 3 years ago
Short Description
Base image for testing the commit-msg validator
Full Description

This image runs Ubuntu 14.04 and includes all the validator requirements, like Python 2.7, JDK 8 and git. nvm is also available to easily switch between different node.js or io.js versions.


1. The container

docker run --rm -it clns/commit-msg bash

This will download the image and run a temporary container leaving you in a bash shell in the sample repository at /root/commit-msg. The container will be deleted automatically when you exit.

2. node.js or io.js install

Now you need to install a version of node.js or io.js and the validator. Example:

nvm install iojs-v1.7.1
npm install commit-msg

For more examples on installing different node.js or io.js versions see

Custom configurations

To use a sample configuration from the examples (e.g. Angular's commit message guidelines) do this:

curl -LO

Validate commit messages

You can now commit and have the messages validated. Example:

touch commit1.txt
git add commit1.txt
git commit -m "this is a test commit"


FROM ubuntu:14.04

RUN apt-get update && \
  apt-get install -y python-software-properties \
  software-properties-common \
  build-essential \
RUN add-apt-repository -y ppa:webupd8team/java && \
  apt-get update && \
  echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections && \
  echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections && \
  apt-get install -y oracle-java8-installer
RUN add-apt-repository -y ppa:git-core/ppa && \
  apt-get update && \
  apt-get install -y git && \
  git config --global "Bot" && \
  git config --global ""

RUN curl -o- | bash

RUN git init /root/commit-msg
WORKDIR /root/commit-msg
RUN echo "# commit-msg test repo" > && git add && \
  git commit -m "Initial commit"
Docker Pull Command