Container image for Cgit web server
1.0K
Container image for Cgit web server.
Make volume for git repository(and certbot certificates if use HTTPS).
docker volume create git-repository
# If uses HTTPS
# docker volume create certbot-config
# docker volume create certbot-data
podman volume create git-repository
# If uses HTTPS
# podman volume create certbot-config
# podman volume create certbot-data
Run container.
docker run -d --name git-web \
--publish 80:80 \
--volume git-repository:/srv/git \
# If uses HTTPS
#--publish 443:443 \
#--volume certbot-config:/etc/letsencrypt \
#--volume certbot-data:/var/lib/letsencrypt \
git-web:latest
podman run -d --name git-web \
--publish 80:80 \
--volume git-repository:/srv/git \
# If uses HTTPS
#--publish 443:443 \
#--volume certbot-config:/etc/letsencrypt \
#--volume certbot-data:/var/lib/letsencrypt \
git-web:latest
If you use prebuilt image, you should provide your own config and assets through volume and environment variables.
docker run -d --name git-web \
+ --env CGIT_ASSETS=/assets \
+ --env NGINX_CONFS=/nginx \
--publish 80:80 \
--volume git-repository:/srv/git \
+ --volume cgit-assets:/assets:ro \
+ --volume nginx-confs:/nginx:ro \
# If uses HTTPS
#--publish 443:443 \
#--volume certbot-config:/etc/letsencrypt \
#--volume certbot-data:/var/lib/letsencrypt \
git-web:latest
podman run -d --name git-web \
+ --env CGIT_ASSETS=/assets \
+ --env NGINX_CONFS=/nginx \
--publish 80:80 \
--volume git-repository:/srv/git \
+ --volume cgit-assets:/assets:ro \
+ --volume nginx-confs:/nginx:ro \
# If uses HTTPS
#--publish 443:443 \
#--volume certbot-config:/etc/letsencrypt \
#--volume certbot-data:/var/lib/letsencrypt \
git-web:latest
CGIT_ASSETS directory structure should looks like this:
app/
cgit.png
favicon.ico
...
cgitrc
NGINX_CONFS directory structure should looks like this:
conf.d/
cgit.conf
...
nginx.conf # If you want to customize global Nginx config
MIT © PtCookie
Softwares in container image may be under their own licenses.
Inspired by cgit-docker
Content type
Image
Digest
sha256:a37cb4bd6…
Size
59.1 MB
Last updated
about 1 year ago
docker pull ptcookie/git-web