Summary
The web service buildArgs in azure.yaml reference environment variables without quotes. When any value contains a space (e.g. a friendly app name like Leeds Digital Permits), the ACR remote build (remoteBuild: true) fails, because the space is split at the shell level and the docker build context argument is lost.
Since these values are meant to hold human-readable text (app name, support fields), values with spaces are the common case, not an edge case.
Error
2026/... Launching container with name: build
"docker build" requires exactly 1 argument.
See 'docker build --help'.
Usage: docker build [OPTIONS] PATH | URL | -
Container failed during run: build. No retries remaining.
failed to run step ID: build: exit status 1
ERROR: step "publish-web" failed: publishing service web: ... remote build failed
Only the web service fails, because it is the only one with buildArgs.
Root cause
Current azure.yaml:
buildArgs:
- NEXT_PUBLIC_APP_NAME=${NEXT_PUBLIC_APP_NAME}
- NEXT_PUBLIC_APP_URL=${SERVICE_WEB_URI}
- NEXT_PUBLIC_SUPPORT_EMAIL=${NEXT_PUBLIC_SUPPORT_EMAIL}
- NEXT_PUBLIC_SUPPORT_PHONE=${NEXT_PUBLIC_SUPPORT_PHONE}
- NEXT_PUBLIC_DEMO_MODE=${NEXT_PUBLIC_DEMO_MODE}
- NEXT_PUBLIC_SHOW_SAMPLE_BANNER=${NEXT_PUBLIC_SHOW_SAMPLE_BANNER}
NEXT_PUBLIC_APP_NAME (and the NEXT_PUBLIC_SUPPORT_* fields) are expected to hold values with spaces, so unquoted expansion breaks the remote build for any realistic deployment.
Proposed fix
Wrap each build-arg value in quotes so spaces are preserved through to docker build --build-arg:
buildArgs:
- NEXT_PUBLIC_APP_NAME="${NEXT_PUBLIC_APP_NAME}"
- NEXT_PUBLIC_APP_URL="${SERVICE_WEB_URI}"
- NEXT_PUBLIC_SUPPORT_EMAIL="${NEXT_PUBLIC_SUPPORT_EMAIL}"
- NEXT_PUBLIC_SUPPORT_PHONE="${NEXT_PUBLIC_SUPPORT_PHONE}"
- NEXT_PUBLIC_DEMO_MODE="${NEXT_PUBLIC_DEMO_MODE}"
- NEXT_PUBLIC_SHOW_SAMPLE_BANNER="${NEXT_PUBLIC_SHOW_SAMPLE_BANNER}"
Steps to reproduce
azd env set NEXT_PUBLIC_APP_NAME "Leeds Digital Permits" (a value containing a space)
azd up (uses remoteBuild: true)
- The
web build fails with "docker build" requires exactly 1 argument.
Environment
- azd remote build (ACR Tasks),
remoteBuild: true
- Reproduced on a governed subscription, region UK South, Premium ACR
Impact
Any deployment that sets a multi-word app name / support fields (the common, intended case) fails at the web build step.
Summary
The
webservicebuildArgsinazure.yamlreference environment variables without quotes. When any value contains a space (e.g. a friendly app name likeLeeds Digital Permits), the ACR remote build (remoteBuild: true) fails, because the space is split at the shell level and thedocker buildcontext argument is lost.Since these values are meant to hold human-readable text (app name, support fields), values with spaces are the common case, not an edge case.
Error
Only the
webservice fails, because it is the only one withbuildArgs.Root cause
Current
azure.yaml:NEXT_PUBLIC_APP_NAME(and theNEXT_PUBLIC_SUPPORT_*fields) are expected to hold values with spaces, so unquoted expansion breaks the remote build for any realistic deployment.Proposed fix
Wrap each build-arg value in quotes so spaces are preserved through to
docker build --build-arg:Steps to reproduce
azd env set NEXT_PUBLIC_APP_NAME "Leeds Digital Permits"(a value containing a space)azd up(usesremoteBuild: true)webbuild fails with"docker build" requires exactly 1 argument.Environment
remoteBuild: trueImpact
Any deployment that sets a multi-word app name / support fields (the common, intended case) fails at the
webbuild step.