diff --git a/Dockerfile b/Dockerfile index 565cb76..99fbcb6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,4 +9,6 @@ RUN ["pip", "install", "-U", "--no-cache-dir", "pip"] ARG CZ_VERSION=2.28.0 RUN pip install --no-cache-dir commitizen==$CZ_VERSION -CMD [ "cz", "version" ] +ENTRYPOINT ["cz"] + +CMD [ "version" ] diff --git a/README.md b/README.md index ef20967..6608d28 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,10 @@ This repo checks daily for the latest version and tries to publish it. ## As Script ```bash -docker run --rm -v $(pwd):/app commitizen/commitizen:latest /bin/sh -c 'cz bump --changelog' +docker run --rm \ + -v $(pwd):/app \ + commitizen/commitizen:latest \ + bump --changelog ``` ## Inside container @@ -34,7 +37,10 @@ Open a terminal inside docker with `cz` available and with the current directory This way we can run any `cz` command. ```bash -docker run --rm -it -v $(pwd):/app commitizen/commitizen:latest +docker run --rm -it \ + --entrypoint /bin/sh \ + -v $(pwd):/app \ + commitizen/commitizen:latest ``` ## Contributing @@ -50,5 +56,5 @@ docker run --rm -it -v $(pwd):/app commitizen/commitizen:latest ```bash ./scripts/build -./scripts/run 'cz ls' +./scripts/cz ls ``` diff --git a/scripts/run b/scripts/cz similarity index 69% rename from scripts/run rename to scripts/cz index ae8a3ab..0973a8c 100755 --- a/scripts/run +++ b/scripts/cz @@ -1,2 +1,2 @@ #!/bin/sh -ex -docker run --rm --name commitizen registry.hub.docker.com/commitizen/commitizen:3 /bin/sh -c "$@" +docker run --rm --name commitizen registry.hub.docker.com/commitizen/commitizen:3 "$@"