-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
88 lines (66 loc) · 1.17 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
ARG DIST=nginx
ARG REL=alpine
#
#
# target: base
#
# gitweb only
#
#
FROM $DIST:$REL AS base
LABEL maintainer=mlan
ENV DOCKER_ENTRY_DIR=/etc/docker/entry.d \
DOCKER_BIN_DIR=/usr/local/bin \
DOCKER_CONF_DIR=/etc/nginx/conf.d \
DOCKER_ENVSUBST_DIR=usr/share/misc \
DOCKER_HIGHLIGHT_CMT='#' \
PROJECTROOT=/var/lib/git/repositories \
PROJECTS_LIST=/var/lib/git/projects.list \
SERVER_NAME=localhost
#
# Copy config files to image
#
COPY src/*/bin $DOCKER_BIN_DIR/
COPY src/*/entry.d $DOCKER_ENTRY_DIR/
COPY src/*/envsubst $DOCKER_ENVSUBST_DIR/
#
# Install
#
# move away default nginx configuration
#
RUN apk --no-cache --update add \
git-gitweb \
perl-cgi \
fcgiwrap \
spawn-fcgi \
&& mv /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.dist
#
# state standard http port 80
#
EXPOSE 80
#
# Rudimentary healthcheck
#
HEALTHCHECK CMD curl -so /dev/null http://localhost/ || exit 1
#
# Entrypoint, how container is run
#
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]
#
#
# target: full
#
# add highlight
#
#
FROM base AS full
#
# Enable highlight
#
ENV DOCKER_HIGHLIGHT_CMT=
#
# Install
#
RUN apk --no-cache --update add \
highlight