Skip to content

Commit

Permalink
FIX: Set safe dir in docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
woile committed Apr 25, 2024
1 parent 7a6a767 commit 4c8f508
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .cz.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ version_provider = "poetry"
version_files = [
"scripts/build",
"CONTIRBUTING.md",
"Dockerfile:cz-kpn=="
"Dockerfile:cz-kpn==",
"README.md:^docker"
]
bump_message = "BUMP: version $current_version → $new_version"
commit_url = "https://github.com/kpn/cz-kpn/commit/$COMMIT_REV"
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ FROM python:3-alpine

LABEL org.label-schema.name="kpnnl/cz-kpn"
LABEL org.label-schema.description="KPN'S COMMITIZEN"

LABEL org.opencontainers.image.source="https://github.com/kpn/cz-kpn"
WORKDIR /app

RUN apk add --update -t --no-cache git curl alpine-sdk

RUN ["pip", "install", "-U", "--no-cache-dir", "pip"]
RUN ["pip", "install", "-U", "--no-cache-dir", "cz-kpn==3.2.8"]
RUN ["git", "config", "--global", "--add", "safe.directory", "/app"]

##### run
ENTRYPOINT [ "/bin/sh", "-c" ]
CMD [ "cz -n cz_kpn --help" ]
CMD [ "cz", "-n", "cz_kpn", "--help" ]
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ or the shortcut
cz c
```
### With docker
```sh
docker run --rm -it -v $(pwd):/app kpnnl/cz-kpn:3.2.8 'cz -n cz_kpn commit'
```
## Features
### Client tool to assist in the creation of a commit
Expand Down

0 comments on commit 4c8f508

Please sign in to comment.