Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

cloud-lab Dockerfile.client: mid-file ARG invisible to FROM — client and killer images unbuildable on docker/buildkit 29 (golang:-bookworm)

Closed
#724 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Amperstrand is already working on this.

Since Oct 7, 2026.

  • #728 by @Amperstrand — open

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenTollGate/tollgate-module-basic-go

All issues in OpenTollGate/tollgate-module-basic-go

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.