An open API service indexing awesome lists of open source software.

https://github.com/fraoustin/gitweb

container docker for run a git server with ihm
https://github.com/fraoustin/gitweb

active docker-image

Last synced: 7 months ago
JSON representation

container docker for run a git server with ihm

Awesome Lists containing this project

README

          

# Docker Image for gitweb

generate a nginx server with git server and gitweb for ihm on http://127.0.0.1/

load when start image load file in

- /usr/share/gitweb/docker-entrypoint.pre
- /usr/share/gitweb/docker-entrypoint.post

## Parameter

- SET_CONTAINER_TIMEZONE (false or true) manage time of container
- CONTAINER_TIMEZONE timezone of container
- GITPROJECT
- GITUSER (default gituser)
- GITPASSWORD (default gitpassword)
- IHM (default "")

## Volume

- /var/lib/git

## Port

- 80 for gitweb

## Command

- addrepos: add repository
- addauth : add user for git
- rmrepos : remove repository
- rmauth : remove user

## Usage direct

run image fraoustin/gitweb

docker run -d -e "CONTAINER_TIMEZONE=Europe/Paris" -e "GITPROJECT=test" -v :/var/lib/git --name test -p 80:80 fraoustin/gitweb

user default is gituser and password default is gitpassword

you use http://localhost/ for access gitweb

you can clone project

git clone http://gituser:gitpassword@localhost/test.git

You can change user and password by variable environment

## Usage by Dockerfile

Sample of Dockerfile

FROM fraoustin/gitweb
COPY ./00_init.sh /usr/share/gitweb/docker-entrypoint.pre/00_init.sh
RUN chmod +x -R /usr/share/gitweb/docker-entrypoint.pre

File 00_init.sh

#!/bin/bash
REPOS='/var/lib/git/test.git'
if [ ! -d $REPOS ]; then
addrepos test
cd $REPOS
chmod -R g+ws .
chgrp -R nginx .
fi
addauth $GITUSER $GITPASSWORD

build image mygit

docker build -t mygit .

run image mygit

docker run -d -e "CONTAINER_TIMEZONE=Europe/Paris" -e "GITUSER=gituser" -e "GITPASSWORD=gitpassword" -v :/var/lib/git --name test -p 80:80 mygit

## IHM material design

If you want use a new design for ihm, you can use IHM variable

- IHM = mdl

docker run -d -e "CONTAINER_TIMEZONE=Europe/Paris" -e "IHM=mdl" -e "GITPROJECT=test" -v :/var/lib/git --name test -p 80:80 fraoustin/gitweb