Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e5b90cb

Browse files
committed
feat: add Dockerfile and README
1 parent 257970f commit e5b90cb

File tree

5 files changed

+62
-1
lines changed

5 files changed

+62
-1
lines changed

‎Dockerfile‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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" ]

‎README.md‎

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,45 @@
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+
```

‎scripts/build‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
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 .

‎scripts/push‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh -e
2+
docker push registry.hub.docker.com/commitizen/commitizen

‎scripts/run‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh -ex
2+
docker run --rm --name commitizen commitizen:2 /bin/sh -c "$@"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /