nvidia-holoscan/holoscan-sensor-bridge

Docker build warning "Default value for ARG ${CONTAINER_VERSION} results in empty or invalid base image name"

Closed this issue · 0 comments

Symptom:
While building the Holoscan Sensor Bridge with the build commands: sh docker/build.sh --igpu or sh docker/build.sh the following warning might appear a the end of the build:

1 warning found (use docker --debug to expand):
- InvalidDefaultArgInFrom: Default value for ARG ${CONTAINER_VERSION} results in empty or invalid base image name (line 19)
Dockerfile.demo:24

Reason:
The reason you see this warning is because the latest JetPack6 revisions install a newer version of Docker BuildKit that evaluates Dockerfile rules to inform of potential issues.
This warning is also explained here: https://docs.docker.com/reference/build-checks/invalid-default-arg-in-from/

Workarounds until issue fixed:

  1. Ignore the warning – While the warning is valid for the general case of a standalone docker file to make sure you are not missing base argumentes that might break the build, in our case the argument that the warning is complaining about is being provided by our build script as an input argument so technically you are not missing anything. The docker check that produces the warning evaluates each of our docker scripts separately without the knowledge about the build script that runs both. Example apps should work OK, however, pytest --imx274 might fail.
  2. Add a default value to docker/Dockerfile.demo – at line 18 you can change the ARG CONTAINER_VERSION to ARG CONTAINER_VERSION= hololink-prototype:1.1.0 or any other string – the string value should not matter since it would be overwritten anyways by our build script input arguments.
  3. Downgrade docker version – Downgrade docker to an older docker version. Steps for install a specific docker version are specified in the following page: https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository (on step 2 select the “specific version" tab for instructions. The docker version tested to work on AGX is VERSION_STRING=5:27.0.3-1~ubuntu.22.04~jammy