blob: b517a28aa1bcb0745ae4543fa8d9ae7b4348ba69 (
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
ARG DEBIAN_VERSION=trixie
ARG CGIT_VERSION=1.3.1
ARG IMAGE_REVISION=2
FROM debian:${DEBIAN_VERSION}-slim AS builder
ARG CGIT_VERSION=1.3.1
ARG CGIT_COMMIT=044821677c774cd24f25f1818ea51d09cc64b006
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
build-essential \
ca-certificates \
git \
libssl-dev \
libzip-dev \
pkg-config \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
RUN git init cgit \
&& cd cgit \
&& git remote add origin https://git.zx2c4.com/cgit \
&& git fetch --depth=1 origin "${CGIT_COMMIT}" \
&& git checkout --detach FETCH_HEAD \
&& git submodule update --init --recursive
WORKDIR /src/cgit
RUN make -j"$(nproc)" \
CGIT_VERSION="${CGIT_VERSION}" \
NO_LUA=1 \
NO_GETTEXT=YesPlease
RUN make install \
CGIT_VERSION="${CGIT_VERSION}" \
NO_LUA=1 \
NO_GETTEXT=YesPlease \
DESTDIR=/out \
CGIT_SCRIPT_PATH=/www/cgi-bin \
CGIT_DATA_PATH=/www
FROM debian:${DEBIAN_VERSION}-slim
ARG CGIT_VERSION=1.3.1
ARG IMAGE_REVISION=2
LABEL org.opencontainers.image.title="cgit" \
org.opencontainers.image.version="${CGIT_VERSION}-r${IMAGE_REVISION}"
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
busybox-static \
cmark-gfm \
python3-pygments \
tini \
zlib1g \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /out/www /www
COPY --chmod=0555 about-filter.py /usr/libexec/cgit/about-filter.py
COPY --chmod=0555 syntax-highlighting.py /usr/libexec/cgit/syntax-highlighting.py
RUN mkdir -p \
/srv/git \
/var/cache/cgit
EXPOSE 8080
ENTRYPOINT ["/usr/bin/tini", "--", "/bin/busybox", "httpd", "-f", "-p", "0.0.0.0:8080", "-h", "/www"]
|