Sign inSign up

engdiegocouto/gitcz

By engdiegocouto

Updated over 6 years ago

A Docker Image that helps you to do semantic commits, based on Commitizen

Image
0

169

engdiegocouto/gitcz repository overview

Commitizen friendly GitHub forks GitHub stars

docker-gitcz

A Docker Image that helps you to do semantic commits. This tools has the base the project Commitizen as tool.

dockeri.co

Build this Image

$ git clone https://github.com/engdiegocouto/docker-gitcz
$ cd docker-gitcz
$ docker build . -t engdiegocouto/gitcz

Volumes

There are two volumes configured in this image: /gitcz/data and /opt/gitcz. The first one storage your git repository and the second one is related to settings of tools as Git, NPM and Commitizen.

NOTE: For safety reasons, a container must not start with root privileges, thus you should mapped directories with write permissions from host to gitcz container.

Using this Image

1 - Supose that you have a Git local repository called myproject in $HOME. Besides that you will create a file called file.txt, so execute:

$ touch $HOME/myproject/file.txt
$ cd $HOME/myproject
$ git add file.txt

2 - So, you can call the command below to make a semantic commit:

$ mkdir -p ${HOME}/storage/gitcz/config
$ docker run --rm -it -u $(id -u):$(id -g) -v ${HOME}/storage/gitcz/config:/opt/gitcz -v ${PWD}:/gitcz/data engdiegocouto/gitcz

If you prefer to use image from Docker Hub, just run the command below

$ docker pull engdiegocouto/gitcz
$ docker run --rm -it -u $(id -u):$(id -g) -v ${HOME}:/root -v ${PWD}:/git engdiegocouto/gitcz

NOTE: If is the first time that you are running this image, set Docker environment variables GIT_CONFIG_NAME and GIT_CONFIG_EMAIL on step 2.

Tag summary

Content type

Image

Digest

Size

60.6 MB

Last updated

over 6 years ago

docker pull engdiegocouto/gitcz