wrangler containers build --build-arg #13170
alexminza
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the solution
wrangler containers builddoes not support--build-arg, which prevents passing build-time variables to the Dockerfile (e.g., pinning a package version viaARG).Current behavior
The command only supports
--tag,--push,--path-to-docker, and global flags.Expected behavior
Passes
--build-argto the underlying docker build. It should be repeatable (matching docker build behavior):Workaround
Split into two commands:
docker build(supports --build-arg)wrangler containers pushThis works but defeats the purpose of wrangler containers build as a single-command build+push workflow.
Use case
Dockerfiles commonly use ARG for version pinning, feature flags, or build-time configuration:
Without
--build-arg, the only alternatives are:Suggested scope
Since wrangler containers build delegates to docker build internally, forwarding
--build-arg(and potentially other common Docker build flags like--target,--no-cache,--secret) should be straightforward. At minimum,--build-argis the most commonly needed.Beta Was this translation helpful? Give feedback.
All reactions