Provides a Gitweb — a Git web interface (web frontend to Git repositories) - docker image (non official).
- Gitweb, read access only
- Small image size based on Alpine Linux
- Healthcheck endpoint
- Use environment variables for customization
- GZIP and Brotli support
- Use
X-Forwarded-Forheader when getting client IP
version: "2.3"
services:
gitweb:
image: ghcr.io/tonyduckles/gitweb:latest
ports:
- "8080:80"
volumes:
- repo-data:/var/lib/git:ro
volumes:
repo-data:For the above example to produce anything interesting the volume repo-data
must include at least one git repository.
When you start the container, you can configure Gitweb by passing one or more environment variables or arguments on the docker run command line.
Set the user nginx runs as.
Default:1000
The directories where your projects are. Must not end with a slash.
Default: PROJECTROOT=/var/lib/git/repositories
Define which file Gitweb reads to learn the git projects. If set to empty
string; Gitweb simply scan the PROJECTROOT directory.
Default: PROJECTS_LIST=/var/lib/git/projects.list
Define the user real-name (GECOS field) for the root user, for prettier
user-name display in Gitweb.
Gitweb shows the real-name of the owner of each
Git repository. Since the container runs as root (uid=0), any bind-mounted
volumes will be owned by root. This allows you to override the real-name for
the singular root user.
Default: ROOT_GECOS=Git
If you'd rather add some additional configuration yourself, you can mount an
additional Nginx config at /etc/nginx/extra.conf, which will be included in
the primary config.
-
Base docker container setup forked from RealOrangeOne/docker-website-server
-
Additional inspiration from mlan/docker-gitweb