From 1b4e0e732cffde5b42c022679a24cfda030ae64c Mon Sep 17 00:00:00 2001 From: Matthieu Baerts Date: Fri, 4 Sep 2026 10:27:52 +0200 Subject: [PATCH] docker: add README file Helpful for people (and non-human) to understand what it is and where to get more details about it. Signed-off-by: Matthieu Baerts --- docker/README.md | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 docker/README.md diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 0000000..8434920 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,63 @@ +# Container images for Netdev tests + +The idea here is to have some container images to get an environment closed to +the CI one, to easily run the same tests as the ones executed on NIPA. + +Instead of installing a bunch of (undocumented) dependences, and trying to guess +which versions are used on NIPA, these containers can be used. + +These images are supposed to be easy to use and maintain. They are automatically +built and pushed to the GitHub registry each time the related files are +modified: . + +The Dockerfile are also kept simple to let more people modifying them if needed: +at the end it is just a bunch of commands someone would execute to install +programs on their side on Fedora. + +## Usage + +To use them, that's easy, either: + +- Execute `docker/build/run.sh` (static tests) or `docker/selftests/run.sh` + (runtime tests) with `--pull`, then execute the same commands as before, but + from the containers. + +- Use the same scripts followed by the same commands as before to execute them + directly from the containers. + +- Use Docker or Podman directly, e.g. + + ```console + $ mkdir -p .ccache + $ docker run \ + -v .ccache:/home/nipa/.ccache:rw \ + -v "${PWD}:${PWD}:rw" \ + -w "${PWD}" \ + -u "${RUID:-$(id -u)}:${RGID:-$(id -g)}" \ + --group-add "$(grep "^kvm:" /etc/group | cut -d: -f3)" \ + --rm \ + -i -t \ + --privileged \ + --pull always \ + ghcr.io/linux-netdev/nipa-selftests:latest \ + ## the rest of the command here + ``` + +For more details about which commands to execute next, please check the wiki: +[Running Netdev CI tests locally](https://github.com/linux-netdev/nipa/wiki/Running-Netdev-CI-tests-locally). + +## Images + +In this repository, there are different images: + +- `base`: a common base for the following ones, on top of Fedora, latest version +- `build`: containing dependencies for the static tests, to run `ingest_mdir.py` +- `selftests`: containing dependencies for the runtime tests: KSelftests, KUnit + +Note: `debian` is a deprecated image to run the static tests. The Netdev CI is +using a Fedora base, so it is recommended to do the same. + +## Build locally + +If you prefer to build container images locally, you can use the +`docker/build.sh` script.