Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build_image_layers.sh: Default value for ARG ${BASE_IMAGE} results in empty or invalid base image name #155

Open
delenius opened this issue Nov 8, 2024 · 2 comments
Assignees
Labels
verify to close Waiting on confirm issue is resolved

Comments

@delenius
Copy link

delenius commented Nov 8, 2024

When I run ./run-dev.sh (which subsequently runs ./build_image_layers.sh), there is an error about the BASE_IMAGE build arg:

Building /homes/elenius/workspaces/isaac_ros-dev/src/isaac_ros_common/scripts/../docker/Dockerfile.ros2_humble as image: ros2_humble-image with base: x86_64-image
BASE_IMAGE_ARG is --build-arg BASE_IMAGE=x86_64-image
[+] Building 0.1s (27/27) FINISHED                                                                                                                          docker:default
 => [internal] load build definition from Dockerfile.ros2_humble                                                                                                      0.0s
 => => transferring dockerfile: 13.71kB                                                                                                                               0.0s
 => WARN: InvalidDefaultArgInFrom: Default value for ARG $BASE_IMAGE results in empty or invalid base image name (line 10)                                            0.0s
 => WARN: LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 17)                                                     0.0s
 => [internal] load metadata for docker.io/library/x86_64-image:latest                                                                                                0.0s
 => [internal] load .dockerignore                                                                                                                                     0.0s
 => => transferring context: 2B                                                                                                                                       0.0s
 => [internal] load build context                                                                                                                                     0.0s
 => => transferring context: 276.05kB                                                                                                                                 0.0s
 => [stage-0  1/22] FROM docker.io/library/x86_64-image:latest                                                                                                        0.0s

(and similarly for subsequent layers). Note that I added an echo of BASE_IMAGE_ARG in the script, the output of which is shown in the output above.
Strangely enough, it still seems to find the right base image, even though there is no default value set in the Dockerfile.
This machine has docker version Docker version 27.3.1, build ce12230

When I run the same exact thing on another machine with docker Docker version 26.1.4, build 5650f9b, these warnings do not appear!

@hemalshahNV
Copy link
Contributor

Docker recently began being more insistent on the key value format. The BASE_IMAGE default argument is only really used for Dockerfile.x86_64 and Dockerfile.aarch64. For all of the remaining Dockerfiles for the downstream image layers, build_image_layers.sh feeds one image into the next using that argument, so its default value is never used.

@hemalshahNV hemalshahNV self-assigned this Nov 8, 2024
@hemalshahNV hemalshahNV added the verify to close Waiting on confirm issue is resolved label Nov 8, 2024
@delenius
Copy link
Author

delenius commented Nov 8, 2024

Oh, I see, it complains because there is no default value, even when a value is passed. I slightly misread it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verify to close Waiting on confirm issue is resolved
Projects
None yet
Development

No branches or pull requests

2 participants