Public Repository

Last pushed: 2 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.

Usage

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 https://github.com/creationix/nvm#usage.

Custom configurations

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

curl -LO https://raw.githubusercontent.com/clns/node-commit-msg/master/test/resources/angular/package.json

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"

Dockerfile

FROM ubuntu:14.04

RUN apt-get update && \
  apt-get install -y python-software-properties \
  software-properties-common \
  build-essential \
  curl
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 user.name "Bot" && \
  git config --global user.email "bot@email.com"

RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash

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

Comments (1)
katyona
2 years ago

Why are you using MY email address? "bot@email.com" is owned by me. http://i.imgur.com/mdx3XRM.png