Skip to main content

Install via Docker

Run git-cliff in Docker containers without local installation.

Quick Start

Run git-cliff from Docker Hub:
docker run -t -v "$(pwd):/app/" orhunp/git-cliff:latest

Available Images

Docker images are available in two registries:
RegistryImage URLUpdates
Docker Huborhunp/git-cliffAutomated on release
GitHub CRghcr.io/orhun/git-cliff/git-cliffAutomated on release

Available Tags

Images follow these tagging conventions:
TagDescriptionExample
latestLatest stable releaseorhunp/git-cliff:latest
X.Y.ZSpecific version (SemVer)orhunp/git-cliff:2.7.0
mainLatest from main branchorhunp/git-cliff:main
sha-<short>Specific commit SHAorhunp/git-cliff:sha-954106f

Usage Examples

1

Basic usage

Run in your git repository:
cd /path/to/your/git/repo
docker run -t -v "$(pwd):/app/" orhunp/git-cliff:latest
This mounts your current directory to /app/ in the container.
2

Generate changelog

Output to a file:
docker run -t -v "$(pwd):/app/" orhunp/git-cliff:latest -o CHANGELOG.md
3

Use custom config

With a custom configuration file:
docker run -t -v "$(pwd):/app/" orhunp/git-cliff:latest --config cliff.toml
4

Specific version

Use a specific version:
docker run -t -v "$(pwd):/app/" orhunp/git-cliff:2.7.0

Advanced Usage

Create a convenient shell alias:Bash/Zsh:
# Add to ~/.bashrc or ~/.zshrc
alias git-cliff='docker run -t -v "$(pwd):/app/" orhunp/git-cliff:latest'
Then reload:
source ~/.bashrc
Usage:
git-cliff -o CHANGELOG.md

Building Custom Images

Build your own Docker image:
1

Clone the repository

git clone https://github.com/orhun/git-cliff.git
cd git-cliff
2

Build the image

DOCKER_BUILDKIT=1 docker build -t git-cliff .
Using BuildKit enables better caching and faster builds.
3

Run your custom image

docker run -t -v "$(pwd):/app/" git-cliff

Volume Mounting

Understanding volume mounts:
docker run -t -v "$(pwd):/app/" orhunp/git-cliff:latest

Common Commands

docker run -t -v "$(pwd):/app/" orhunp/git-cliff:latest -o CHANGELOG.md

Troubleshooting

The container runs as a specific user. Fix ownership:
# Run with your user ID
docker run -t -v "$(pwd):/app/" --user $(id -u):$(id -g) orhunp/git-cliff:latest
Or fix permissions after:
sudo chown -R $USER:$USER .
Ensure you’re mounting the git repository root:
# Check you're in a git repo
git rev-parse --show-toplevel

# Run from repo root
cd $(git rev-parse --show-toplevel)
docker run -t -v "$(pwd):/app/" orhunp/git-cliff:latest
Make sure the config file is in the mounted directory:
# List files to verify
ls -la cliff.toml

# Run with explicit path
docker run -t -v "$(pwd):/app/" orhunp/git-cliff:latest --config /app/cliff.toml
If pulling from Docker Hub fails, try GitHub Container Registry:
docker pull ghcr.io/orhun/git-cliff/git-cliff:latest
docker run -t -v "$(pwd):/app/" ghcr.io/orhun/git-cliff/git-cliff:latest
Or authenticate with GitHub:
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
On Windows, use PowerShell:
docker run -t -v "${PWD}:/app/" orhunp/git-cliff:latest
Or use WSL2:
docker run -t -v "$(pwd):/app/" orhunp/git-cliff:latest

Next Steps

Configuration

Learn how to configure git-cliff

CI/CD Integration

Automate with GitHub Actions

Build docs developers (and LLMs) love