File tree Expand file tree Collapse file tree 5 files changed +62
-1
lines changed Expand file tree Collapse file tree 5 files changed +62
-1
lines changed Original file line number Diff line number Diff line change 1+ FROM python:3-alpine
2+
3+ WORKDIR /app
4+
5+ # Add dependencies
6+ RUN apk add --update -t --no-cache git curl alpine-sdk
7+
8+ RUN ["pip" , "install" , "commitizen>=2,<3" ]
9+
10+ CMD [ "cz version" ]
Original file line number Diff line number Diff line change 1- # commitizen-docker-image
1+ # commitizen-docker-image
2+
3+ > commitizen now avaialble in docker 💪
4+
5+ ## Docker images
6+
7+ We publish only major versions starting with ` v2 ` .
8+
9+ | Tag | Description |
10+ | ------------------------------ | -------------------------------------- |
11+ | ` commitizen/commitizen:latest ` | Latest major version, at the moment v2 |
12+ | ` commitizen/commitizen:2 ` | Points to latest v2 |
13+
14+ ## Usage
15+
16+ ## As Script
17+
18+ ``` bash
19+ docker run --rm -v $( pwd) :/usr/src/project commitizen/commitizen:latest /bin/sh -c ' cz bump --changelog'
20+ ```
21+
22+ ## Inside container
23+
24+ Open a terminal inside docker with ` cz ` available and with the current directory mounted.
25+ This way we can run any ` cz ` command.
26+
27+ ``` bash
28+ docker run --rm -it -v $( pwd) :/usr/src/project commitizen/commitizen:latest
29+ ```
30+
31+ ## Contributing
32+
33+ ### Build and push image
34+
35+ ``` bash
36+ ./scripts/build
37+ ./scripts/push
38+ ```
39+
40+ ### Test locally
41+
42+ ``` bash
43+ ./scripts/build
44+ ./scripts/run ' cz ls'
45+ ```
Original file line number Diff line number Diff line change 1+ #! /bin/sh -e
2+ set -x
3+ docker build -t registry.hub.docker.com/commitizen/commitizen:2 -t registry.hub.docker.com/commitizen/commitizen:latest .
Original file line number Diff line number Diff line change 1+ #! /bin/sh -e
2+ docker push registry.hub.docker.com/commitizen/commitizen
Original file line number Diff line number Diff line change 1+ #! /bin/sh -ex
2+ docker run --rm --name commitizen commitizen:2 /bin/sh -c " $@ "
You can’t perform that action at this time.
0 commit comments