-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
101 lines (90 loc) · 3.56 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
89
90
91
92
93
94
95
96
97
98
99
100
101
ARG DEBIAN_CODENAME="bookworm"
FROM docker.io/library/debian:${DEBIAN_CODENAME}-slim
ARG DEBIAN_CODENAME="bookworm"
ENV DEBIAN_CODENAME="${DEBIAN_CODENAME}"
ARG CLANG_VERSION="18"
ENV CLANG_VERSION="${CLANG_VERSION}"
LABEL Name="DeBuilder"
ARG IMAGE_VERSION="local-dirty"
LABEL Version="${IMAGE_VERSION}"
LABEL Vendor="MangaDex"
LABEL Maintainer="MangaDex open-source <[email protected]>"
ENV DEBIAN_FRONTEND "noninteractive"
ENV TZ "UTC"
RUN echo 'Dpkg::Progress-Fancy "0";' > /etc/apt/apt.conf.d/99progressbar
# Setup base HTTPS+GPG APT
RUN apt -qq update && \
apt -qq -y full-upgrade && \
apt -qq -y --no-install-recommends install \
apt-utils \
apt-transport-https \
ca-certificates \
curl \
debian-archive-keyring \
gnupg2 && \
apt -qq update && \
apt -qq -y full-upgrade && \
apt -qq -y --purge autoremove && \
apt -qq -y clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/cache/* /var/log/*
# Setup base build tools
RUN apt -qq update && \
apt -qq -y full-upgrade && \
apt -qq -y --no-install-recommends install \
build-essential \
bzip2 \
ca-certificates \
cmake \
debhelper \
devscripts \
gdb \
git \
libjemalloc-dev \
libpcre2-dev \
libreadline-dev \
libsystemd-dev \
pkg-config \
tar \
vim \
wget \
zip unzip && \
apt -qq -y --purge autoremove && \
apt -qq -y clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/cache/* /var/log/*
# Setup more up to date build with Clang $CLANG_VERSION & friends from the LLVM snapshots repository (bless them)
RUN curl -Ss https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | tee /usr/share/keyrings/llvm-snapshots-archive-keyring.gpg >/dev/null && \
gpg --dry-run --quiet --import --import-options import-show /usr/share/keyrings/llvm-snapshots-archive-keyring.gpg | grep "6084F3CF814B57C1CF12EFD515CF4D18AF4F7421" && \
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshots-archive-keyring.gpg] https://apt.llvm.org/${DEBIAN_CODENAME}/ llvm-toolchain-${DEBIAN_CODENAME}-${CLANG_VERSION} main" | tee /etc/apt/sources.list.d/llvm.list && \
apt -qq update && \
apt -qq -y full-upgrade && \
apt -qq -y --no-install-recommends install \
clang-${CLANG_VERSION} \
libclang-rt-${CLANG_VERSION}-dev \
lldb-${CLANG_VERSION} \
lld-${CLANG_VERSION} \
llvm-${CLANG_VERSION} \
&& \
apt -qq -y --purge autoremove && \
apt -qq -y clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/cache/* /var/log/*
RUN update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${CLANG_VERSION} 100 && \
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${CLANG_VERSION} 100 && \
cc --version && \
c++ --version
# Setup common library dependencies (ie most things will end up depending on it)
RUN apt -qq update && \
apt -qq -y full-upgrade && \
apt -qq -y --no-install-recommends install \
libpcre2-dev \
libreadline-dev \
libsystemd-dev \
zlib1g-dev && \
apt -qq -y --purge autoremove && \
apt -qq -y clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/cache/* /var/log/*
# Ensure entrypoint has "proper" init process by default, simplifying test runs where processes can't handle being pid 1 due to signals
# see: https://github.com/haproxy/haproxy/issues/2562
ENV TINI_VERSION=v0.19.0
ADD "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini" /tini
RUN chmod -v +x /tini
ENTRYPOINT ["/tini", "--", "/bin/bash"]