File tree Expand file tree Collapse file tree 3 files changed +58
-0
lines changed Expand file tree Collapse file tree 3 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ # Devcontainer Examples
2+
3+ The following directory includes examples of [ Visual Studio Code Devcontainer] ( https://code.visualstudio.com/docs/devcontainers/containers ) configurations for developing ebpf applications.
Original file line number Diff line number Diff line change 1+ FROM mcr.microsoft.com/devcontainers/go:1.23-bookworm
2+
3+ RUN apt update
4+
5+ RUN apt install -y build-essential
6+ RUN apt install -y pkg-config
7+ RUN apt install -y clang
8+ RUN apt install -y llvm
9+ RUN apt install -y git
10+ RUN apt install -y libelf-dev
11+ RUN apt install -y libpcap-dev
12+ RUN apt install -y iproute2
13+ RUN apt install -y iputils-ping
14+ RUN apt install -y linux-headers-generic
15+ RUN apt install -y libbpf-dev
16+ RUN apt install -y linux-libc-dev
17+ RUN apt install -y cmake
18+ RUN apt install -y libpcap-dev
19+ RUN apt install -y libcap-ng-dev
20+ RUN apt install -y libbfd-dev
21+ RUN apt install -y gcc-multilib
22+ RUN apt install -y m4
23+ RUN ln -sf /usr/include/asm-generic/ /usr/include/asm
24+ RUN apt install -y libcap-dev
25+ RUN ln -sf /usr/local/go/bin/go /bin/go
26+ RUN ln -sf /usr/include/asm-generic/ /usr/include/asm
27+
28+ RUN mkdir /sources/
29+ WORKDIR /sources/
30+ RUN git clone --recurse-submodules https://github.com/libbpf/bpftool.git
31+ RUN make -C bpftool/src/ install
32+ RUN git clone --recurse-submodules https://github.com/xdp-project/xdp-tools.git
33+ RUN make -C xdp-tools/ install
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " Go-ebpf-env" ,
3+ "build" : {"dockerfile" : " Dockerfile" },
4+
5+ // Configure tool-specific properties.
6+ "customizations" : {
7+ // Configure properties specific to VS Code.
8+ "vscode" : {
9+ "settings" : {},
10+ "extensions" : [
11+ " streetsidesoftware.code-spell-checker" ,
12+ " ms-vscode.cpptools-extension-pack" ,
13+ " ms-vscode.cpptools" ,
14+ " nicknickolaev.ebpf-assembly" ,
15+ " golang.Go"
16+ ]
17+ }
18+ },
19+
20+ "runArgs" : [" --network=host" ],
21+ "privileged" : true
22+ }
You can’t perform that action at this time.
0 commit comments