-
Notifications
You must be signed in to change notification settings - Fork 33
/
Dockerfile
30 lines (24 loc) · 832 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
FROM debian:jessie
MAINTAINER [email protected]
ENV \
GIT_GROUP="${GIT_GROUP:-www-data}"
RUN \
apt-get update && \
apt-get install -y fcgiwrap git gitweb nginx && \
rm -rf /var/lib/apt/lists/* && \
echo "\ndaemon off;" >> /etc/nginx/nginx.conf && \
chown -R www-data:www-data /var/lib/nginx
COPY nginx /etc/nginx/
RUN mkdir /etc/gitweb
RUN rm -f /etc/nginx/sites-enabled/default
VOLUME ["/etc/gitweb", "/etc/nginx/sites-enabled", "/var/lib/git", \
"/var/lib/git-http"]
CMD \
[ ! -f /etc/nginx/sites-enabled/git-http ] && \
cp /etc/nginx/sites-available/git-http /etc/nginx/sites-enabled/; \
[ ! -f /etc/gitweb/gitweb.conf ] && \
cp /etc/gitweb.conf /etc/gitweb/; \
echo "FCGI_GROUP=${GIT_GROUP}" > /etc/default/fcgiwrap && \
service fcgiwrap start && \
service nginx start
EXPOSE 80 443