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

fix: define all build args at the top of the Dockerfile #110

Merged
merged 1 commit into from
May 13, 2024

Conversation

eeberhard
Copy link
Member

Description

Fix following build failure here:

Build args need to be declared at the top layer, otherwise they might be skipped in intermediate layers and remain undefined. As part of this, I removed the secondary declarations of the build args in the later layer.

Review guidelines

Estimated Time of Review: 1.1 minutes

Checklist before merging:

  • Confirm that the relevant changelog(s) are up-to-date in case of any user-facing changes

@eeberhard eeberhard requested review from domire8 and LouisBrunner May 13, 2024 11:49
@eeberhard eeberhard merged commit 712b712 into main May 13, 2024
@eeberhard eeberhard deleted the fix/build-arg branch May 13, 2024 11:55
@LouisBrunner
Copy link
Contributor

This is incorrect and actually breaks the metadata:

                "devcontainer.metadata": "[{\"containerUser\": \"ros2\"}]",
                "org.opencontainers.image.base.name": ":",
                "org.opencontainers.image.description": "AICA base ROS 2 image (includes ros2_control)",
                "org.opencontainers.image.ref.name": "ubuntu",
                "org.opencontainers.image.title": "AICA ROS 2 image",
                "org.opencontainers.image.version": "",
                "tech.aica.image.metadata": "{\"type\":\"base/ws\",\"base\":{\"name\":\"${BASE_IMAGE}:${BASE_TAG}\",\"version\":\"${VERSION}\"}}"

Stages only inherit the ARG from the stages they inherit from and top-level ARG are seemingly only associated with the first stage, resulting in empty metadata (some is also badly formatted, introduced in #109 (comment)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants