Building Demo-Application Container Images

Link-Inline™ Software User Guide

Platform
Napatech SmartNIC
Content Type
User Guide
Capture Software Version
Link-Inline™ Software 3.2

Use this procedure to build demo-application container images.

Before you begin

Make sure that you have:

About this task

Build a container image with the forward application and another container image with the inline-test application. This procedure provides examples of docker commands for building container images. Alternatively, you can use your preferred tool, such as podman or nerdctl.

Procedure

  1. Build application container images.
    For example:
    cd /opt/ntinl
    docker build -t k8s.io/ntapps:<version> \
    -f kubernetes_v<version>/docker/Dockerfile.ntapps .
    This nerdctl command builds a container image for Kubernetes (k8s.io) components.
    • version is the version identifier of the corresponding package.
    • build: Used to build container images from a Dockerfile.
    • -t k8s.io/ntapps:<version>: The image will be tagged with k8s.io/ntapps and the version.
      Note: See the README.md file to find the correct version number of the container image, which is included in the following directory of the package.
      /opt/ntinl/kubernetes_v<version>/README.md
    • -f kubernetes_v<version>/docker/Dockerfile.ntapps: Specifies the path to the Dockerfile that will be used for building the image, where version is the version identifier of the corresponding package.
    For example:
    docker build -t k8s.io/ntapps:1.1 \
    -f kubernetes_v22.11.1/docker/Dockerfile.ntapps .
    An output example:
    [+] Building 402.6s (31/31)
     => [builder  7/16] RUN sed -i "s/'vmdq_dcb',/'vmdq_dcb', 'nt_examples\/n  0.2s
    [+] Building 403.1s (31/31) FINISHED
     => [internal] load build definition from Dockerfile.ntapps                0.0s
     => => transferring dockerfile: 1.82kB                                     0.0s
     => [internal] load metadata for docker.io/library/fedora:37               0.9s
     => [internal] load .dockerignore                                          0.0s
     => => transferring context: 2B                                            0.0s
     => [internal] load build context                                          0.8s
     => => transferring context: 1.14MB                                        0.7s
    …
    …
     => exporting to docker image format                                      54.8s
     => => exporting layers                                                   29.5s
     => => exporting manifest sha256:5b83dba1b90ac467524fa05afafbeb547a67f506  0.0s
     => => exporting config sha256:a5c9d3b62eb53a40cb1ae80c38966591a524e9e2a4  0.0s
     => => sending tarball                                                    25.2s
    Loaded image: k8s.io/ntapps:1.1
  2. Build the container image with the forward application.
    For example:
    docker build -f kubernetes_v22.11.1/docker/Dockerfile.ntforward .
    An output example:
    [+] Building 402.6s (31/31)
     => [builder  7/16] RUN sed -i "s/'vmdq_dcb',/'vmdq_dcb', 'nt_examples\/n  0.2s
    [+] Building 403.1s (31/31) FINISHED
     => [internal] load build definition from Dockerfile.ntapps                0.0s
     => => transferring dockerfile: 1.82kB                                     0.0s
     => [internal] load metadata for docker.io/library/fedora:37               0.9s
     => [internal] load .dockerignore                                          0.0s
     => => transferring context: 2B                                            0.0s
     => [internal] load build context                                          0.8s
     => => transferring context: 1.14MB                                        0.7s
     => [builder  1/16] FROM docker.io/library/fedora:37@sha256:361dae73bfb67  0.0s
     => => resolve docker.io/library/fedora:37@sha256:361dae73bfb67f30fac4f1c  0.0s
    …
    …
     => exporting to docker image format                                      54.8s
     => => exporting layers                                                   29.5s
     => => exporting manifest sha256:5b83dba1b90ac467524fa05afafbeb547a67f506  0.0s
     => => exporting config sha256:a5c9d3b62eb53a40cb1ae80c38966591a524e9e2a4  0.0s
     => => sending tarball                                                    25.2s
    Loaded image: k8s.io/ntapps:1.1
  3. Check available images.
    For example:
    docker images
    An output example:
    REPOSITORY          TAG  IMAGE ID     CREATED        PLATFORM    SIZE      BLOB SIZE
    …
    k8s.io/ntapps       1.1  5b83dba1b90a 13 minutes ago linux/amd64 1.8 GiB   627.3 MiB
    k8s.io/ntdevplugin  1.5  3d3bfb20557a 41 minutes ago linux/amd64 563.0 MiB 316.5 MiB
    k8s.io/ntforward    1.1  1c09fec883e1 2 minutes ago  linux/amd64 1.2 GiB   484.6 MiB
    k8s.io/ntmain       1.1  bd16c0c255a4 29 minutes ago   linux/amd64 593.2 MiB 320.8 MiB
    …