github.com/cilium/ebpf@v0.15.1-0.20240517100537-8079b37aa138/testdata/docker/Dockerfile (about)

     1  # This Dockerfile generates a build environment for generating ELFs
     2  # of testdata programs. Run `make build` in this directory to build it.
     3  FROM golang:bullseye
     4  
     5  COPY llvm-snapshot.gpg.key .
     6  
     7  RUN apt-get update && \
     8      apt-get -y --no-install-recommends install ca-certificates gnupg && \
     9      apt-key add llvm-snapshot.gpg.key && \
    10      rm llvm-snapshot.gpg.key && \
    11      apt-get remove -y gnupg && \
    12      apt-get autoremove -y && \
    13      rm -rf /var/lib/apt/lists/*
    14  
    15  COPY llvm.list /etc/apt/sources.list.d
    16  
    17  RUN apt-get update && \
    18      apt-get -y --no-install-recommends install \
    19      make git \
    20      libbpf-dev \
    21      clang-format \
    22      clang-11 llvm-11 \
    23      clang-14 llvm-14 \
    24      clang-17 llvm-17 && \
    25      rm -rf /var/lib/apt/lists/*
    26  
    27  # Examples use `#include <asm/types.h>` which Debian carries in asm-generic/ instead.
    28  RUN ln -s /usr/include/asm-generic /usr/include/asm
    29  
    30  RUN GOBIN=/usr/local/bin go install golang.org/x/tools/cmd/stringer@latest && rm -rf /go/pkg