Skip to content

Commit d5961af

Browse files
committed
feat: use docker entrypoint
fixes issue #12 BREAKING CHANGE: wrapping script are simplified but not compatible with previous version
1 parent 601902c commit d5961af

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ RUN ["pip", "install", "-U", "--no-cache-dir", "pip"]
99
ARG CZ_VERSION=2.28.0
1010
RUN pip install --no-cache-dir commitizen==$CZ_VERSION
1111

12-
CMD [ "cz", "version" ]
12+
ENTRYPOINT ["cz"]
13+
14+
CMD [ "version" ]

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ This repo checks daily for the latest version and tries to publish it.
2424
## As Script
2525

2626
```bash
27-
docker run --rm -v $(pwd):/app commitizen/commitizen:latest /bin/sh -c 'cz bump --changelog'
27+
docker run --rm \
28+
-v $(pwd):/app \
29+
commitizen/commitizen:latest \
30+
bump --changelog
2831
```
2932

3033
## Inside container
@@ -33,7 +36,10 @@ Open a terminal inside docker with `cz` available and with the current directory
3336
This way we can run any `cz` command.
3437

3538
```bash
36-
docker run --rm -it -v $(pwd):/app commitizen/commitizen:latest
39+
docker run --rm -it \
40+
--entrypoint /bin/sh \
41+
-v $(pwd):/app \
42+
commitizen/commitizen:latest
3743
```
3844

3945
## Contributing
@@ -49,5 +55,5 @@ docker run --rm -it -v $(pwd):/app commitizen/commitizen:latest
4955

5056
```bash
5157
./scripts/build
52-
./scripts/run 'cz ls'
58+
./scripts/cz ls
5359
```

scripts/run renamed to scripts/cz

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/sh -ex
2-
docker run --rm --name commitizen registry.hub.docker.com/commitizen/commitizen:2 /bin/sh -c "$@"
2+
docker run --rm --name commitizen registry.hub.docker.com/commitizen/commitizen:2 "$@"

0 commit comments

Comments
 (0)