commitizen-tools/commitizen-docker-image

Command in README and WORKDIR don't match

bilelomrani1 opened this issue · 3 comments

In the README, the command

docker run --rm -v $(pwd):/usr/src/project commitizen/commitizen:latest /bin/sh -c 'cz bump --changelog'

suggests to mount the current directory to /usr/src/project. But in the Dockerfile, the WORKDIR is set to /app and hence docker run -v $(pwd):/usr/src/project commitizen/commitizen git status raises

fatal: not a git repository (or any of the parent directories): .git
woile commented

Nice catch, we gotta update the readme to point to $(pwd):/app instead

Hello, the docker hub readme needs to be updated too:
https://hub.docker.com/r/commitizen/commitizen

As Script
docker run --rm -v $(pwd):/usr/src/project commitizen/commitizen:latest /bin/sh -c 'cz bump --changelog'
Inside container
Open a terminal inside docker with cz available and with the current directory mounted. This way we can run any cz command.

docker run --rm -it -v $(pwd):/usr/src/project commitizen/commitizen:latest
woile commented

Thanks, I've updated the README manually on docker hub