-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.Dockerfile
77 lines (65 loc) · 2.01 KB
/
build.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
ARG IMAGE
ARG PREFIX=/usr/local
FROM ${IMAGE} as builder
ARG DEBIAN_FRONTEND=noninteractive
ARG GIT_VERSION
ARG PREFIX
ARG MODE=install
ARG USE_LIBPCRE=1
ARG NO_SVN_TESTS=1
ARG NO_PERL_CPAN_FALLBACKS=1
ARG NO_TCLTK=1
ARG NO_INSTALL_HARDLINKS=1
ARG GIT_SKIP_TESTS=t9020
ARG DEFAULT_TEST_TARGET=prove
ARG DESTDIR=/tmp/src
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
# Minimal dependencies for compiling and installing the Git binaries
dh-autoreconf \
libcurl4-gnutls-dev \
libexpat1-dev \
gettext \
zlib1g-dev \
libssl-dev \
libpcre2-dev \
make \
# Additional dependencies to add the documentation in various formats
asciidoc \
xmlto \
docbook2x \
# On a Debian-based distribution you also need the install-info package
install-info \
# Supplemental dependencies for testing CVS and mail interoperability
apache2 \
gnupg \
liberror-perl \
## CVS
cvsps \
libdbd-sqlite3-perl \
## mail
libmailtools-perl \
## Patch asciidoc
&& if [ -f /usr/lib/python3/dist-packages/asciidoc/asciidoc.py ]; then \
sed -i "s/self.separator = ast.literal_eval('\"'/self.separator = ast.literal_eval('r\"'/g" \
/usr/lib/python3/dist-packages/asciidoc/asciidoc.py; \
else \
sed -i "s/self.separator = ast.literal_eval('\"'/self.separator = ast.literal_eval('r\"'/g" \
/usr/bin/asciidoc; \
fi
COPY scripts/git-prompt /var/tmp/
COPY scripts/*.sh /usr/bin/
RUN mkdir -p /tmp/var/cache/gsi \
&& ln -s /etc /tmp/etc \
&& mkdir -p /tmp/usr/local \
&& ln -s /usr/local/share /tmp/usr/local/share \
&& start.sh
FROM scratch
LABEL org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.source="https://gitlab.b-data.ch/git/gsi" \
org.opencontainers.image.vendor="b-data GmbH" \
org.opencontainers.image.authors="Olivier Benz <olivier.benz@b-data.ch>"
ARG PREFIX
COPY --from=builder ${PREFIX} ${PREFIX}
COPY --from=builder /etc/bash_completion.d /etc/bash_completion.d