-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathDockerfile
31 lines (25 loc) · 1007 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# small is beautiful
FROM alpine:latest
MAINTAINER Anthony Hogg [email protected]
# The container listens on port 80, map as needed
EXPOSE 80
# This is where the repositories will be stored, and
# should be mounted from the host (or a volume container)
VOLUME ["/git"]
# We need the following:
# - git-daemon, because that gets us the git-http-backend CGI script
# - fcgiwrap, because that is how nginx does CGI
# - spawn-fcgi, to launch fcgiwrap and to create the unix socket
# - nginx, because it is our frontend
RUN apk add --update nginx && \
apk add --update git-daemon && \
apk add --update fcgiwrap && \
apk add --update spawn-fcgi && \
rm -rf /var/cache/apk/*
COPY nginx.conf /etc/nginx/nginx.conf
# launch fcgiwrap via spawn-fcgi; launch nginx in the foreground
# so the container doesn't die on us; supposedly we should be
# using supervisord or something like that instead, but this
# will do
CMD spawn-fcgi -s /run/fcgi.sock /usr/bin/fcgiwrap && \
nginx -g "daemon off;"