-
Notifications
You must be signed in to change notification settings - Fork 136
/
Copy pathDockerstub
84 lines (77 loc) · 2.61 KB
/
Dockerstub
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
ARG TARGETARCH
# - u-boot-tools: for mkimage, to test the UImage packer/unpacker
RUN apt-get -y update && \
apt-get -y install --no-install-recommends \
build-essential \
cmake \
cpio \
git \
genisoimage \
liblz4-dev \
liblzo2-dev \
libzstd-dev \
lzop \
mtd-utils \
pigz \
zip \
qemu-user-static \
u-boot-tools \
unar \
zstd
# python-lzo needed by ubireader
RUN python3 -m pip install python-lzo
# Install apktool and uber-apk-signer
RUN apt-get -y update && apt-get -y install openjdk-17-jdk
RUN wget https://raw.githubusercontent.com/iBotPeaches/Apktool/v2.3.3/scripts/linux/apktool -O /usr/local/bin/apktool && \
wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.3.3.jar -O /usr/local/bin/apktool.jar && \
wget https://github.com/patrickfav/uber-apk-signer/releases/download/v1.0.0/uber-apk-signer-1.0.0.jar -O /usr/local/bin/uber-apk-signer.jar && \
chmod +x /usr/local/bin/apktool*
# Install official 7-zip
RUN if [ "$TARGETARCH" = "arm64" ]; then \
cd /tmp && \
wget https://www.7-zip.org/a/7z2201-linux-arm64.tar.xz && \
tar -xf 7z2201-linux-arm64.tar.xz && \
mv 7zz /usr/local/bin && \
rm 7z2201-linux-arm64.tar.xz 7zzs; \
fi;
RUN if [ "$TARGETARCH" = "amd64" ]; then \
cd /tmp && \
wget https://www.7-zip.org/a/7z2201-linux-x64.tar.xz && \
tar -xf 7z2201-linux-x64.tar.xz && \
mv 7zz /usr/local/bin && \
rm 7z2201-linux-x64.tar.xz 7zzs; \
fi;
# Install the correct version of squashfs-tools. We specifically need the
# "-no-exit" argument, which is only available in version 4.5+
RUN cd /tmp && \
git clone https://github.com/plougher/squashfs-tools.git && \
cd squashfs-tools/squashfs-tools && \
git checkout 4.5.1 && \
sed -i 's/^#\(XZ\|LZO\|LZ4\|ZSTD\)_SUPPORT/\1_SUPPORT/g' Makefile && \
make -j && \
make install && \
cd /tmp && \
rm -r squashfs-tools
# Install UEFIExtract (build from source, pinned to releae A68)
RUN cd /tmp && \
wget https://github.com/LongSoft/UEFITool/archive/refs/tags/A68.zip && \
unzip A68.zip && \
rm A68.zip && \
cd UEFITool-A68 && \
cmake UEFIExtract && \
make install && \
cd /tmp && \
rm -r UEFITool-A68
# Multiarch packages necessary for various tests to work on ARM
RUN if [ "$TARGETARCH" = "arm64" ]; then \
dpkg --add-architecture amd64 && apt-get update && \
apt-get -y install --no-install-recommends \
libc6:amd64 \
zlib1g:amd64 \
libselinux1:amd64 \
libacl1:amd64 \
libmpc3:amd64 \
libisl23:amd64 \
libstdc++6:amd64 \
crossbuild-essential-amd64; \
fi;