Public Repository

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

Gitweb & Docker

This an example how to run Gitweb in a docker container.

git clone -b small gitweb
cd gitweb


First generate a keypair or copy your public key to the build
directory and name it gitweb_rsa:

rm -f
ssh-keygen -t rsa -b 4096 -f gitweb_rsa -C 'user@localhost'
cp -iv gitweb_rsa ~/.ssh/

Tell git which key to use

In ~/.ssh/config, add your key:

cat >> ~/.ssh/config << EOF
Host localhost
  Hostname localhost
  User gitweb
  IdentityFile ~/.ssh/gitweb_rsa

Build & run

docker build -t elektret/gitweb-small .
docker run -dp 8080:80 -p 6060:22 --name some-gitweb elektret/gitweb-small

Web interface

Your web interface should be accessible through http://localhost:8080/.

Create a new remote repository

ssh -i gitweb_rsa gitweb@localhost -p 6060
git init --bare repos/project.git
echo "Hello World" > repos/project.git/description

Create a new local repository

git init project.git
cd project.git
git remote add origin ssh://gitweb@localhost:6060/repos/project.git
git add
git commit -m 'First commit'
git push -u origin master
Docker Pull Command