The Dockerfiles in this repo (located under the .devcontainer directory) are the same Dockerfiles that are used on the backend build systems when a PR is built as part of the PR checks. This provides an easy and convenient way to ensure that any changes being made can be built using the same backend infrastructure.
There are three Dockerfiles available:
Dockerfile_Ubuntu(default)Dockerfile_RockyDockerfile_AzureLinux
There are two primary ways to build using containers:
-
If you use VS Code the repo has support for VS Code Dev Containers. To use this functionality, you need to have the VS Code Dev Containers extension installed as well as Docker. Once installed open VS Code and the
ProcDump-for-Linuxfolder and go to command palette and select "Dev Containers: Rebuild and Reopen in Container". Once the container has finished building, you will be connected to the newly built container. You can also switch which Dockerfile you are using by setting thedockerfilefield in the filedevcontainer.json. For more information about VS Code Dev Containers please see - https://code.visualstudio.com/docs/devcontainers/containers -
Use the Dockerfiles located under the
.devcontainerdirectory and build/run docker locally.
To build inside the container:
mkdir build
cd build
cmake ..
makesudo apt update
sudo apt -y install gcc cmake make clang clang-12 gdb zlib-devel libelf-dev build-essential libbpf-dev linux-tools-common linux-tools-$(uname -r)
sudo yum install gcc make cmake clang gdb zlib-devel elfutils-libelf-devel libbpf-devel bpftool
mkdir build
cd build
cmake ..
makeThe distribution packages for Procdump for Linux are constructed utilizing dpkg-deb for Debian targets and rpmbuild for Fedora targets.
Create a deb package:
make debCreate an rpm package:
make rpm