-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
69 lines (62 loc) · 2.87 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
#FROM debian:bookworm-slim
# we need to use sid (testing) because systemd-ukify is not part of bookworm (stable 12) - check with trixie (stable 13) when that is released
FROM debian:sid-slim
LABEL maintainer="Thomas Sänger <[email protected]>"
ENV DIFFOSCOPE_VERSION=294
ENV COREBOOT_VERSION=24.12
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get dist-upgrade --yes && \
apt-get install --yes --no-install-recommends \
apktool \
build-essential \
clang \
cmake \
curl \
devscripts \
equivs \
genisoimage \
git \
libssl-dev \
libxml2-dev \
libxmlb-dev \
ninja-build \
python3-pip \
wget \
zlib1g-dev && \
git clone https://github.com/radareorg/radare2.git /opt/radare2 && /opt/radare2/sys/install.sh && \
curl -sSL https://salsa.debian.org/reproducible-builds/diffoscope/-/archive/${DIFFOSCOPE_VERSION}/diffoscope-${DIFFOSCOPE_VERSION}.tar.gz | tar xzC /opt && ln -sv /opt/diffoscope-${DIFFOSCOPE_VERSION} /opt/diffoscope && \
mk-build-deps --install --tool 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' /opt/diffoscope/debian/control && \
rm -rf /opt/diffoscope/debian && \
ln -s /usr/lib/x86_64-linux-gnu/xb-tool /usr/local/bin/xb-tool && \
pip3 --no-cache-dir install --break-system-packages defusedxml r2pipe && \
git clone https://github.com/tpoechtrager/apple-libtapi.git /tmp/apple-libtapi && cd /tmp/apple-libtapi && ./build.sh && ./install.sh && cd / && rm -rf /tmp/apple-libtapi && \
git clone https://github.com/tpoechtrager/xar.git /tmp/xar && cd /tmp/xar/xar && ./configure && make -j $(nproc) && make install && cd / && rm -rf /tmp/xar && \
git clone https://github.com/tpoechtrager/apple-libdispatch.git /tmp/libdispatch && cd /tmp/libdispatch && cmake -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ . && ninja && ninja install && cd / && rm -rf /tmp/libdispatch && \
git clone https://github.com/tpoechtrager/cctools-port.git /tmp/cctools-port && cd /tmp/cctools-port/cctools && ./configure && make -j $(nproc) && make install && cd / && rm -rf /tmp/cctools-port && \
rm /usr/local/bin/ar && \
rm /usr/local/bin/as && \
rm /usr/local/bin/ld && \
rm /usr/local/bin/nm && \
rm /usr/local/bin/ranlib && \
rm /usr/local/bin/size && \
rm /usr/local/bin/strings && \
rm /usr/local/bin/strip && \
curl -sSL https://coreboot.org/releases/coreboot-${COREBOOT_VERSION}.tar.xz | tar xJC /tmp && cd /tmp/coreboot-${COREBOOT_VERSION}/util && make -C cbfstool -j $(nproc) && make install -C cbfstool && cd / && rm -rf /tmp/coreboot-${COREBOOT_VERSION} && \
apt-get remove --purge --yes \
build-essential \
clang \
cmake \
curl \
devscripts \
equivs \
git \
ninja-build \
python3-pip \
wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN useradd -ms /bin/bash user
USER user
WORKDIR /home/user
ENV PATH="/opt/diffoscope/bin:${PATH}"
ENTRYPOINT ["/opt/diffoscope/bin/diffoscope"]