aboutsummaryrefslogtreecommitdiff
path: root/cgit/Dockerfile
blob: 91004f76767c72dcc519aefe8841a43190cb3fe4 (plain) (blame)
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
FROM nginx:1.31.2-alpine3.23

RUN addgroup -S git -g 1001 && adduser -S -G git -u 1001 -D git

RUN apk add --no-cache \
    ca-certificates \
    fcgiwrap \
    git \
    lua5.3-libs \
    py3-markdown \
    py3-pygments \
    py3-docutils \
    groff \
    python3 \
    spawn-fcgi \
    tzdata \
    md4c \
  && true

# Cgit build deps
RUN apk add --no-cache \
    make \
    gcc \
    musl-dev \
    xz \
    zlib \
    zlib-dev \
    openssl-dev \
  && true

COPY install-cgit.sh /
RUN /install-cgit.sh "1.3.1"

RUN rm -rf /var/cache/apk/* && rm -rf /tmp/*

COPY docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
COPY nginx/ /etc/nginx

# RUN set -eux \
#     && echo "Creating application directories..." \
#     && mkdir -p /var/cache/cgit \
#     && mkdir -p /srv/git \
#     && true

RUN set -eux \
  && echo "Testing Nginx server configuration files..." \
  && nginx -c /etc/nginx/nginx.conf -t \
  && true

RUN ls -la /docker-entrypoint.sh

ENTRYPOINT [ "/docker-entrypoint.sh" ]

EXPOSE 80

STOPSIGNAL SIGQUIT

CMD [ "nginx", "-g", "daemon off;" ]