Skip to content

keyolk/bpfenv

Repository files navigation

bpfenv

There is no official bpftrace and bcc container image for arm64 architecture yet. Also official image supports old distribution yet.

This is for building bpf related container images for both arm64 and amd64 architectures. Currently supports the below environment.

  • bcc
  • bpftrace
  • bpftool
  • dbgenv

For the below os distribution, it would search and setup related kernel development package if needed.

  • AmazonLinux2

It follows official build process as much as possible.

To take clang and LLVM dependencies, it uses Cmake configurations from iovisor/bpftrace

Build and push image

See its help command

$ make
dbgenv/arm64 dbgenv/amd64       Build dbgenv
bcc/arm64 bcc/amd64             Build bpftrace
bpftrace/arm64 bpftrace/amd64   Build bpftrace
base/arm64 base/amd64           Build base image
llvm/arm64 llvm/amd64           Build LLVM base
help                            This help

To build bpftrace image for arch64

$ make bpftrace/arch64      # build

Run container

$ IMAGE=gavinjeong/bpftrace:v0.15.0-focal-arm64
$ docker run \
  -ti --rm --init --privileged --pid host --net host \
  -e /etc/os-release:/etc/os-release:ro \
  -v /etc/localtime:/etc/localtime:ro \
  -v /sys:/sys:rw \
  -v /usr/src:/usr/src:rw \
  -v /lib/modules:/lib/modules:rw \
  -v /boot:/boot:ro \
  -v /usr/bin/docker:/usr/bin/docker:ro \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  $IMAGE bash

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published