cloud-lab Dockerfile.client: mid-file ARG invisible to FROM — client and killer images unbuildable on docker/buildkit 29 (golang:-bookworm)
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- docker, go
- Domain
- build-system
Research direction
Read tests/cloud-lab/Dockerfile.client and compare its ARG placement with tests/cloud-lab/Dockerfile.tollgate:10-11; packaging/build-inputs.json and packaging/build-env.sh show the Go version source. Reproduce with docker compose build client from tests/cloud-lab. Done means the client and killer image builds proceed past the invalid FROM parse; an open linked pull request already addresses this issue.
Written by the indexing model from the issue text.
Description
Summary
tests/cloud-lab/Dockerfile.client declares ARG GO_VERSION AFTER the first FROM, so the second stage's FROM golang:${GO_VERSION}-bookworm cannot see it on docker/buildkit 29 — the build fails with failed to parse stage name "golang:-bookworm": invalid reference format. Dockerfile.tollgate does it correctly (ARG before any FROM) — the client file diverges.
This also breaks run-crash-injection.sh, whose killer image builds from Dockerfile.client.
Verified on
- Commit:
68ad5144ab09cb4723d8f3f655cbba1ac7ea9de5(main, 2026-10-07) - docker 29.1.3 / buildkit (linux/amd64)
Evidence (verbatim)
#2 WARN: InvalidDefaultArgInFrom: Default value for ARG golang:${GO_VERSION}-bookworm results in empty or invalid base image name (line 13)
#2 WARN: UndefinedArgInFrom: FROM argument 'GO_VERSION' is not declared (line 13)
...
target killer: failed to solve: failed to parse stage name "golang:-bookworm": invalid reference format
The file today (tests/cloud-lab/Dockerfile.client, abridged):
FROM rust:1.88-bookworm AS rust-builder
RUN cargo install cdk-cli --locked
# Toolchain from the manifest — see Dockerfile.tollgate's header note.
ARG GO_VERSION=1.26.8 # <-- declared mid-file: stage-scoped, invisible to the FROM below
FROM golang:${GO_VERSION}-bookworm AS go-builder
Reproduce
git checkout 68ad5144ab09cb4723d8f3f655cbba1ac7ea9de5
cd tests/cloud-lab
export TG_GO_VERSION="$(jq -r '.go.version' ../../packaging/build-inputs.json)"
docker compose build client # dies at parse; same for ./run-crash-injection.sh (killer)
Note the trap: exporting TG_GO_VERSION does NOT help — compose's ${TG_GO_VERSION:-1.26.8} default is bypassed when the variable is set-but-empty, and even set correctly the Dockerfile still needs the ARG at global scope for FROM interpolation.
Fix
Hoist the declaration above the first FROM (keep or drop the mid-file one — hoisting alone fixes FROM; the stage also sees global ARGs for RUN):
ARG GO_VERSION=1.26.8
FROM rust:1.88-bookworm AS rust-builder
...
FROM golang:${GO_VERSION}-bookworm AS go-builder
One line, matches Dockerfile.tollgate's existing pattern. After the fix, docker compose build client and ./run-crash-injection.sh proceed past the parse.
References
- Correct pattern in-tree:
tests/cloud-lab/Dockerfile.tollgate:10-11 - Toolchain pinning:
packaging/build-inputs.json(.go.version),packaging/build-env.sh
- Dominant language
- Go
- Stars
- 12
- Forks
- 14
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 244
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenTollGate/tollgate-module-basic-go
-
Session event emits the customer's MAC address in the p tag — spec-invalid value on every payment responsePossibly taken @Amperstrand claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OpenTollGate/tollgate-module-basic-go#949 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenTollGate/tollgate-module-basic-go#833 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
OpenTollGate/tollgate-module-basic-go#813 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OpenTollGate/tollgate-module-basic-go#804 ·
Maintainers usually reply within 1 day
-
go-battery needs an ndsctl on PATH: TestPurchaseSessionGuardHoldsThroughTheOutcomeUnknownWindow fails on bare hosts (passes with stub)Possibly taken @Amperstrand claimed this 8 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenTollGate/tollgate-module-basic-go#726 · 2 comments ·
Maintainers usually reply within 1 day
All issues in OpenTollGate/tollgate-module-basic-go
Similar issues
-
Difficulty 2/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
area/security kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
agent-substrate/substrate#2935 ·
Maintainers usually reply within 1 day
-
100 points complexity: trivial documentation drips-wave good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
automation models
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Guardian health server binds :8080 and collides with the Voltron proxyPossibly taken @denislemire claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
projectcalico/calico#14341 ·
Maintainers usually reply within 1 day