-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
52 lines (51 loc) · 2.02 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
FROM ubuntu:22.04 AS builder
COPY busybox.config .
RUN DEBIAN_FRONTEND=noninteractive apt-get -y update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
ca-certificates \
git \
make \
gcc libc6-dev \
gcc-arm-linux-gnueabi libc6-dev-armel-cross \
gcc-aarch64-linux-gnu libc6-dev-arm64-cross \
gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross \
gcc-riscv64-linux-gnu libc6-dev-riscv64-cross \
&& git clone --depth 1 -b 1_30_1 https://git.busybox.net/busybox/ \
&& mv busybox.config busybox/.config \
&& cd busybox \
&& make -j$(nproc) busybox && mv busybox ../busybox-x86_64 \
&& make CROSS_COMPILE=arm-linux-gnueabi- -j$(nproc) busybox && mv busybox ../busybox-arm \
&& make CROSS_COMPILE=aarch64-linux-gnu- -j$(nproc) busybox && mv busybox ../busybox-arm64 \
&& make CROSS_COMPILE=powerpc64le-linux-gnu- -j$(nproc) busybox && mv busybox ../busybox-ppc64le \
&& make CROSS_COMPILE=riscv64-linux-gnu- -j$(nproc) busybox && mv busybox ../busybox-riscv64
FROM ubuntu:22.04
RUN DEBIAN_FRONTEND=noninteractive apt-get -y update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
ca-certificates \
curl \
git \
file \
bc \
make \
flex \
bison \
ccache \
libelf-dev \
gcc libc6-dev \
gcc-arm-linux-gnueabi libc6-dev-armel-cross \
gcc-aarch64-linux-gnu libc6-dev-arm64-cross \
gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross \
gcc-riscv64-linux-gnu libc6-dev-riscv64-cross \
lzop \
llvm \
clang \
lld \
qemu-system-x86 \
qemu-system-arm \
qemu-system-ppc \
qemu-system-riscv64 \
opensbi \
python3 \
libssl-dev \
&& rm -r /var/lib/apt/lists/*
COPY --from=builder busybox-* /root/