Giter VIP home page Giter VIP logo

gitweb's Introduction

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 <localpath>:/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 <localpath>:/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

gitweb's People

Contributors

fraoustin avatar sakurai-youhei avatar zctmdc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gitweb's Issues

htpasswd erro

docker run --rm -e "CONTAINER_TIMEZONE=Europe/Paris" -e "GITPROJECT=test" fraoustin/gitweb

Current default time zone: 'Etc/UTC'
Local time is now:      Wed Jun  8 09:57:34 UTC 2022.
Universal Time is now:  Wed Jun  8 09:57:34 UTC 2022.

Container timezone set to: Europe/Paris
run-parts: executing /usr/share/gitweb/docker-entrypoint.pre/00_init.sh
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint:   git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint:   git branch -m <name>
Initialized empty Git repository in /var/lib/git/test.git/
htpasswd: Unable to generate random bytes: Function not implemented
run-parts: /usr/share/gitweb/docker-entrypoint.pre/00_init.sh exited with return code 8

uname -a

Linux HL-DSM 3.10.108 #42218 SMP Mon Oct 18 19:15:14 CST 2021 x86_64 GNU/Linux synology_bromolow_3615xs

rmauth didn't work

If you try to delete a user you get an error message.
In my opinion gitweb/src/cmd/rmauth.sh line 16 should look like:
htpasswd -D $FPASS $1

without the 'b' option. ( -b Use the password from the command line rather than prompting for it.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.