Important: cgit does not have an official Docker image. As a lightweight C-based CGI application, cgit is designed to run directly with a web server. The following are community-maintained Docker options.
| Image | Source | Notes |
|---|---|---|
danielqsj/cgit |
Docker Hub | Community-maintained |
luque/daniel-cgit |
GitHub | With nginx + fcgiwrap |
peterdavehello/cgit |
Docker Hub | Minimal setup |
This example uses a community image with nginx and fcgiwrap for CGI support.
services:
cgit:
image: luque/daniel-cgit:latest
ports:
- "80:80"
volumes:
- /srv/git:/srv/git:ro
- ./cgitrc:/etc/cgitrc:ro
environment:
- CGIT_TITLE=My Git Repositories
- CGIT_URL=/
For production deployments, install cgit traditionally:
Build from source:
git clone https://git.zx2c4.com/cgit/
make prefix=/usr
sudo make install
Configure web server (Apache/nginx/lighttpd) with CGI support
Create /etc/cgitrc with repository paths
See cgit Setup for the traditional installation guide.
Any questions?
Feel free to contact us. Find all contact information on our contact page.