Skip to content

marcopompili/docker-nginx-git

Repository files navigation

docker-nginx-git

Pulls

Docker image for a Git HTTP server on Nginx.

This image is based on the phusion/baseimage base image for solving the PID 1 problem of Docker and for other factors.

For more informations check these links:

Installation

Download the image from the docker's hub:

docker pull emarcs/nginx-git

Usage

The simply run a container, remember to mount a volume from the host with all your repositories, in the example the host folder /git is mounted in the container at: /srv/git:

docker run -d -p 8180:80 -v /git:/srv/git emarcs/nginx-git

Docker Compose

Here's an example using Docker Compose:

test_srv:
  image: emarcs/nginx-git
  ports:
    - 8180:80
  volumes:
    - /srv/git:/srv/git
    - logs:/var/log/nginx
    # add your custom username and password (default is: admin, admin)
    - ./htpasswd:/srv/htpasswd
    # if you want to use a custom configuration
    - ./default.conf:/etc/nginx/conf.d/default.conf
  environment:
    GIT_POSTBUFFER: 1048576

Test it:

git clone http://localhost:8180/myrepo.git

Default username and password are admin/admin. I strongly suggest you to update the htpasswd file with your password, like so:

htpasswd htpasswd admin

About

Docker image for a Git HTTP server on Nginx.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published