A Docker Image that helps you to do semantic commits, based on Commitizen
169
A Docker Image that helps you to do semantic commits. This tools has the base the project Commitizen as tool.
$ git clone https://github.com/engdiegocouto/docker-gitcz
$ cd docker-gitcz
$ docker build . -t engdiegocouto/gitcz
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.
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_NAMEandGIT_CONFIG_EMAILon step 2.
Content type
Image
Digest
Size
60.6 MB
Last updated
over 6 years ago
docker pull engdiegocouto/gitcz