-
Notifications
You must be signed in to change notification settings - Fork 682
Open
Description
I have done the following
- I have searched the existing issues
- If possible, I've reproduced the issue using the 'main' branch of this project
Steps to reproduce
Dockerfile:
ARG PYTHON_IMAGE="python:3.13-slim"
FROM ${PYTHON_IMAGE} AS builderFirst build it without explicitly passing this value, then try building by explicitly passing it as a build arg.
Example using the container CLI:
container build
container build --build-arg PYTHON_IMAGE="python:3.13-slim"Current behavior
The first command fails because the default value is not used to fill in the arg when you don't supply it. The second command works as expected.
container build
[+] Building 0.0s (0/0)
Error: unknown (2): failed to solve: invalid ref: ${PYTHON_IMAGE}Note that this does work as expected when building with alternatives like Docker and Rancher (= Lima under the hood).
Expected behavior
The first command also works, by using the supplied default value from the Dockerfile.
Environment
- OS: macOS 26.3.1
- Xcode: Version 26.3
- Container: container CLI version 0.10.0 (build: release, commit: 6bdb647)Relevant log output
N/ACode of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels