...

Text file src/github.com/cilium/ebpf/testdata/docker/README.md

Documentation: github.com/cilium/ebpf/testdata/docker

     1# `cilium/ebpf` LLVM Builder Image
     2
     3This is a simple Docker image to provide reproducible eBPF ELF builds across
     4contributors' workstations. This standardizes on a single environment used to
     5regenerate e.g. testdata ELFs and does not depend on the toolchain installed
     6on the host machine.
     7
     8Additionally, it reduces drift in the bytecode committed to the repository over
     9time as the same exact clang + llc version is used throughout the development
    10lifecycle. Only when upgrading or rebuilding the Docker image would changes in
    11.elf files be expected (assuming the .c files are untouched).
    12
    13## Building
    14
    15Building the image requires Docker. Run the build with:
    16
    17`make build`
    18
    19This updates the `VERSION` file. Commit it and submit a PR upstream.
    20
    21### Regeneration Testdata on non-x86 platforms
    22
    23Before running `make`, ensure [Docker buildx](https://docs.docker.com/buildx/working-with-buildx/)
    24is enabled. Additionally `QEMU user` and `binfmt` should be installed. On a Debian based distribution
    25the command to add them is `apt install qemu-user-static binfmt-support`.
    26
    27
    28## Pushing
    29
    30After building, push the image to the Docker registry specified in `IMAGE` with:
    31
    32`make push`

View as plain text