This project is a cgit docker image.
It aims to be as simple as possible. No authentication, no SSH, just browsing repositories on a web page. The container doesn't write to the repositories so they can be read-only.
docker build --tag cgit .
Examples are provided in the examples directory.
CGITRC: Host directory containing a cgitrc configuration, see cgitrc manual.COMMIT_FILTER: Host directory containing an executable commit-filter.sh script to format Git commit messages. See the commit-filter section of the cgitrc manual.ABOUT: Host directory containing about.md for the front page "about" section.REPOSITORIES: Host directory containing your Git repositories.dockerdocker run \
--rm \
--name cgit \
--publish 8080:80 \
--mount type=bind,src=CGITRC,dst=/etc/cgit,ro \
--mount type=bind,src=COMMIT_FILTER,dst=/usr/local/lib/cgit/filters/commit \
--mount type=bind,src=ABOUT,dst=/srv/cgit,ro \
--mount type=bind,src=REPOSITORIES,dst=/srv/git,ro \
cgit
Browse the website here.
docker composeExample compose.yaml:
services:
cgit:
build: .
image: cgit
container_name: cgit
ports:
- 8080:80
volumes:
- CGITRC:/etc/cgit:ro
- COMMIT_FILTER:/usr/local/lib/cgit/filters/commit
- ABOUT:/srv/cgit:ro
- REPOSITORIES:/srv/git:ro
Browse the website here.
cgitrcAdd a cgitrc file at the root of a repository to configure it for cgit. Note that this only works with the scan-path setting.
Example cgitrc:
desc=Repository description
owner=Repository owner
section=Repository section
Content type
Image
Digest
sha256:fc587db5e…
Size
62.8 MB
Last updated
3 months ago
docker pull tvanbesi/cgit