github.com/castai/kvisor@v1.7.1-0.20240516114728-b3572a2607b5/Dockerfile.builder (about) 1 ################################################################################ 2 # INSTRUCTIONS 3 ################################################################################ 4 # 5 # This Dockerfile is meant to create a building/exec environment for tracee. 6 # 7 ################################################################################ 8 9 FROM ubuntu:jammy 10 11 ARG uid=1000 12 ARG gid=1000 13 14 # ubuntu has been extremely slow with the default archive 15 16 #RUN echo "deb http://br.archive.ubuntu.com/ubuntu jammy main restricted universe multiverse" > /etc/apt/sources.list && \ 17 # echo "deb http://br.archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse" >> /etc/apt/sources.list 18 19 # install needed environment 20 21 RUN export DEBIAN_FRONTEND=noninteractive && \ 22 apt-get update && \ 23 apt-get install -y sudo coreutils findutils && \ 24 apt-get install -y bash git curl rsync && \ 25 apt-get install -y build-essential clang-14 make pkg-config && \ 26 apt-get install -y linux-headers-generic && \ 27 apt-get install -y libelf-dev && \ 28 apt-get install -y zlib1g-dev && \ 29 update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 140 --slave /usr/bin/clang++ clang++ /usr/bin/clang++-14 --slave /usr/bin/llc llc /usr/bin/llc-14 --slave /usr/bin/clang-format clang-format /usr/bin/clang-format-14 --slave /usr/bin/clangd clangd /usr/bin/clangd-14 30 31 # extra tools for testing things 32 33 RUN export DEBIAN_FRONTEND=noninteractive && \ 34 apt-get install -y bash-completion vim && \ 35 apt-get install -y iproute2 vlan bridge-utils net-tools && \ 36 apt-get install -y netcat-openbsd iputils-ping && \ 37 apt-get install -y wget lynx w3m && \ 38 apt-get install -y stress && \ 39 apt-get install -y dnsutils 40 41 ARG TARGETARCH 42 RUN export DEBIAN_FRONTEND=noninteractive && \ 43 curl -L -o /tmp/golang.tar.xz https://go.dev/dl/go1.21.5.linux-$TARGETARCH.tar.gz && \ 44 tar -C /usr/local -xzf /tmp/golang.tar.xz && \ 45 update-alternatives --install /usr/bin/go go /usr/local/go/bin/go 1 && \ 46 rm /tmp/golang.tar.xz 47 48 RUN export DEBIAN_FRONTEND=noninteractive && \ 49 curl -L -o /tmp/bpftool.tar.xz https://github.com/libbpf/bpftool/releases/download/v7.3.0/bpftool-v7.3.0-$TARGETARCH.tar.gz && \ 50 tar -C /usr/bin -xzf /tmp/bpftool.tar.xz && \ 51 chmod +x /usr/bin/bpftool && \ 52 rm /tmp/bpftool.tar.xz 53 54 ENV HOME /home 55 WORKDIR /home/app