Lightweight Docker image containing an Nginx webserver to visualize git repositories (through GitWeb) and provide read-only access to them over HTTP.
Image source at: https://github.com/interxis/gitweb
docker run -v /path/to/repos:/srv/git:ro -p 80:80 rockstorm/gitweb
Your repositories should be visible at http://localhost.
You should be able to clone/fetch/pull your repositories like:
git clone http://localhost/your-repo.git
The provided nginx.conf
and gitweb.conf
files are the default
configurations for the Nginx webserver and GitWeb (the
repository visualizer) respectively. To override them just mount your
custom files at:
services:
gitweb:
...
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./gitweb.conf:/etc/gitweb.conf:ro
By default, a very basic configuration of Nginx is provided. For more advanced configuration options please consult the official Nginx documentation.
To apply a theme to GitWeb like Stefan's gitweb-theme:
-
Mount the theme files somewhere:
services: gitweb: ... volumes: - /path/to/theme/folder:/usr/share/gitweb/theme:ro
-
Add the relevant lines on your
gitweb.conf
file:our @stylesheets = "theme/gitweb.css"; our $logo = "theme/git-logo.png"; our $favicon = "theme/git-favicon.png";
View license information for the software contained in this image.
As with all Docker images, these likely also contain other software which may be under other licenses (such as git, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.
This image is heavily inspired by Kostya's gitweb-readonly but simpler and lighter. This image is also inspired by rockstorm101's gitweb-docker
GitWeb configuration hints thanks to Arch's Wiki.