Simple to configure / use cgit instance running on Alpine+Lighttpd
453
This repo contains files to create your own Docker image consisting of lighttpd and cgit.
Usually, you would just need to point and use the docker image uploaded to github. Use "sudhan/lighttpd_cgit" image.
NOTE: The docker automated build is now setup on docker hub.
Clone and build:
git clone https://github.com/p2c2e/docker-lighttpd-cgit.git
cd docker-lighttpd-cgit
docker build . -t lighttpd_cgit
If you are planning to use existing image on hub.docker.com, try to get the image via pull (to check if you are able to get it)
docker pull sudhan/lighttpd-cgit
To successfully use the image, you will need to:
Assuming this is all done, run the image as follows. This example assumes that there is a cgitrepos file in /tmp and /tmp/localrepos has the repositories to display.
docker run -v /tmp/localrepos:/var/git -v /tmp/cgitrepos:/etc/cgitrepos -p 8888:80 -d sudhan/lighttpd-cgit
As a sample, the above command uses /tmp/cgitrepos that contains the following:
# Non bare repo - hence pointing explicitly to .git folder. Read the cgit docs.
repo.url=My Repo 1
repo.path=/var/git/myrepo/.git
repo.desc=This repo is at /tmp/localrepos/myrepo in local machine. It is a normal (non-bare) repo
Content type
Image
Digest
Size
13 MB
Last updated
over 5 years ago
docker pull sudhan/lighttpd-cgit