https://github.com/marcopompili/docker-nginx-git
Docker image for a Git HTTP server on Nginx.
https://github.com/marcopompili/docker-nginx-git
docker-image git nginx
Last synced: 8 months ago
JSON representation
Docker image for a Git HTTP server on Nginx.
- Host: GitHub
- URL: https://github.com/marcopompili/docker-nginx-git
- Owner: marcopompili
- License: mit
- Created: 2016-01-31T16:48:50.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-01-25T15:13:08.000Z (almost 5 years ago)
- Last Synced: 2024-12-22T10:34:36.355Z (11 months ago)
- Topics: docker-image, git, nginx
- Language: Dockerfile
- Homepage:
- Size: 16.6 KB
- Stars: 11
- Watchers: 2
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- stars - marcopompili/docker-nginx-git
README
# docker-nginx-git
[](https://hub.docker.com/r/emarcs/nginx-git) [](https://hub.docker.com/r/emarcs/nginx-git) 
Docker image for a Git HTTP server on Nginx.
This image is based on the [phusion/baseimage](https://github.com/phusion/baseimage-docker)
base image for solving the PID 1 problem of Docker and for other factors.
For more informations check these links:
* [Docker and the PID 1 zombie reaping problem](https://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/)
* [Baseimage-docker](http://phusion.github.io/baseimage-docker/)
the base image used in this image.
## Installation
Download the image from the docker's hub:
```shell
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__:
```shell
docker run -d -p 8180:80 -v /git:/srv/git emarcs/nginx-git
```
### Docker Compose
Here's an example using Docker Compose:
```yml
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:
```shell
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:
```shell
htpasswd htpasswd admin
```