Skip to content

Commit 441e59f

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

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

Dockerfile

+3-1
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

+9-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ This repo checks daily for the latest version and tries to publish it.
2525
## As Script
2626

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

3134
## Inside container
@@ -34,7 +37,10 @@ Open a terminal inside docker with `cz` available and with the current directory
3437
This way we can run any `cz` command.
3538

3639
```bash
37-
docker run --rm -it -v $(pwd):/app commitizen/commitizen:latest
40+
docker run --rm -it \
41+
--entrypoint /bin/sh \
42+
-v $(pwd):/app \
43+
commitizen/commitizen:latest
3844
```
3945

4046
## Contributing
@@ -50,5 +56,5 @@ docker run --rm -it -v $(pwd):/app commitizen/commitizen:latest
5056

5157
```bash
5258
./scripts/build
53-
./scripts/run 'cz ls'
59+
./scripts/cz ls
5460
```

scripts/run renamed to scripts/cz

+1-1
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:3 /bin/sh -c "$@"
2+
docker run --rm --name commitizen registry.hub.docker.com/commitizen/commitizen:3 "$@"

0 commit comments

Comments
 (0)