Build a Docker image

Build a Docker image for your sensor.

Before you begin

Make sure that:
  • Docker is installed. (Nozomi Networks has tested Docker versions 18.09 and 20.10.)
  • BuildKit is installed. (Docker 18.09 or higher is required. To activate BuildKit, refer to the Docker BuildKit documentation.)

About this task

You can use variables to customize the container version build. Use the --build-arg command line switch to pass the variables to the Docker build command.

Procedure

To build the image, from the directory containing the artifacts, enter this command:
docker build -t n2os .
An example of a customization:
docker build --build-arg APT_PROXY=10.0.0.17:5843 -t n2os
To customize the method the sensor uses to communicate, these parameters can be given in the build command:
Parameter Default value Description
APT_PROXY None Proxy to be used to download container packages
N2OS_HTTP_PORT 80 Specify custom hypertext transfer protocol (HTTP) web port
N2OS_HTTPS_PORT 443 Specify custom hypertext transfer protocol secure (HTTPS) web port
The image is created.