interxis / gitweb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitWeb Docker Image

Test Build Status Docker Image Size

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

Basic Use Case

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

Customization

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.

Apply a Theme

To apply a theme to GitWeb like Stefan's gitweb-theme:

  1. Mount the theme files somewhere:

    services:
      gitweb:
      ...
        volumes:
          - /path/to/theme/folder:/usr/share/gitweb/theme:ro
    
  2. 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";
    

License

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.

Credits

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.

About

License:GNU General Public License v3.0


Languages

Language:CSS 93.2%Language:Dockerfile 4.0%Language:Shell 2.8%