forked from marcopompili/docker-nginx-cgit
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (36 loc) · 1.32 KB
/
Dockerfile
File metadata and controls
52 lines (36 loc) · 1.32 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM debian:testing
ENV DEBIAN_FRONTEND noninteractive
MAINTAINER Bertrand Roussel "broussel@sierrawireless.com"
RUN apt-get -qq update && \
apt-get upgrade -qy && \
apt-get -qy install apt-utils gettext-base \
fcgiwrap git cgit highlight perl \
ca-certificates nginx gettext-base \
markdown python-docutils groff && \
echo 'UTC' > /etc/timezone && \
dpkg-reconfigure tzdata && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Add Tini
ENV TINI_VERSION v0.13.2
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
RUN useradd nginx
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
EXPOSE 80 443
RUN mkdir /srv/git
VOLUME ["/srv/git"]
VOLUME ["/var/cache/cgit"]
COPY cgitrc.template /etc/
COPY syntax-highlighting.sh /usr/lib/cgit/filters/
COPY default.conf /etc/nginx/sites-available/default
COPY 404.html /usr/share/nginx/html/
COPY 401.html /usr/share/nginx/html/
COPY startup /
CMD ["/startup"]
ENV CGIT_TITLE "My cgit interface"
ENV CGIT_DESC "Super fast interface to my git repositories"
ENV CGIT_VROOT "/"
ENV CGIT_SECTION_FROM_STARTPATH 0