blob: abecc89a6903d01b09fec8acadb3082314898c2f (
plain)
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
|
FROM ubuntu:24.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
COPY . /app
WORKDIR /app
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git ca-certificates pkg-config \
build-essential make gcc \
libssl-dev libzip-dev zlib1g-dev \
libcurl4-openssl-dev \
liblua5.4-dev \
gettext && \
git submodule update --init --recursive && \
rm -rf /var/lib/apt/lists/*
RUN make NO_REGEX=NeedsStartEnd LUA_PKGCONFIG=lua5.4 -j"$(nproc)" install
FROM ubuntu:24.04 AS runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends lighttpd lighttpd-mod-magnet liblua5.4-0 python3 highlight python3-markdown python3-pygments && \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /var/www/htdocs/cgit /usr/share/webapps/cgit
COPY ./source-code-pro/ /usr/share/webapps/cgit/
COPY ./about.html /usr/share/webapps/cgit/about.html
COPY ./filters /usr/lib/cgit/filters
COPY lighttpd.conf /etc/lighttpd/lighttpd.conf
COPY cgitrc /etc/cgitrc
COPY cgitrepos /etc/cgitrepos
RUN mkdir -p /var/cache/cgit && \
chown -R www-data:www-data /var/cache/cgit
EXPOSE 80
ENTRYPOINT [ "lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf" ]
|