-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
59 lines (51 loc) · 1.86 KB
/
Dockerfile
File metadata and controls
59 lines (51 loc) · 1.86 KB
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
FROM ubuntu:24.04
# Install base packages
RUN apt-get update && apt-get install -y \
# Build essentials
build-essential bc bison flex libssl-dev libelf-dev \
libncurses-dev git fakeroot xz-utils \
# LLVM/Clang toolchain for Rust and modern features
clang llvm lld llvm-dev libclang-dev \
# Debugging and analysis
gdb addr2line crash \
# Performance tools
linux-tools-generic \
# Python for various tools
python3 python3-pip python3-dev \
# Rust dependencies
curl \
# Network tools for QEMU
netcat-openbsd socat \
# Additional utilities
vim tmux htop tree jq \
# Static analysis tools
sparse cppcheck \
# Documentation tools
graphviz \
# QEMU for testing kernels
qemu-system-x86 \
# Additional tools for rootfs creation
cpio gzip \
&& rm -rf /var/lib/apt/lists/*
# Install Rust toolchain
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Install Rust components for kernel development
RUN rustup toolchain install nightly-2024-09-05 && \
rustup component add rust-src rustfmt clippy rust-analyzer
# Install bindgen for Rust FFI
RUN cargo install bindgen-cli --version 0.65.1
# Install bpftrace and BCC for eBPF development
RUN apt-get update && apt-get install -y \
bpftrace libbpfcc-dev python3-bpfcc-tools \
&& rm -rf /var/lib/apt/lists/*
# Install syzkaller dependencies
RUN go_version="1.21.5" && \
wget -O go.tar.gz "https://golang.org/dl/go${go_version}.linux-amd64.tar.gz" && \
tar -C /usr/local -xzf go.tar.gz && \
rm go.tar.gz
ENV PATH="/usr/local/go/bin:${PATH}"
WORKDIR /workspace
# Direct entrypoint logic without separate file
ENTRYPOINT ["/bin/bash", "-c", "case \"$1\" in setup) exec /scripts/init-workspace.sh ;; build) exec /scripts/build-all.sh ;; *) exec \"$@\" ;; esac", "--"]
CMD ["bash"]