]> quire.kejadlen.dev Git - quire.git/commit
Re-declare GIT_VERSION inside the build stage so it expands
authorAlpha Chen <alpha@kejadlen.dev>
Sun, 26 Apr 2026 03:22:30 +0000 (03:22 +0000)
committerAlpha Chen <alpha@kejadlen.dev>
Sun, 26 Apr 2026 14:19:45 +0000 (07:19 -0700)
commit905a657e0735602347ef01ff6b5055168a389abb
tree2d52480c51fdd027db5b22e67beddfdd7720f4c3
parentcc183a2d1824a4527b968e2f50da4221c4762215
Re-declare GIT_VERSION inside the build stage so it expands

A pre-FROM ARG is a global build arg and is not in scope inside any
build stage. With it unset in the stage, ${GIT_VERSION} in the curl
URL expanded to an empty string, so we fetched
github.com/git/git/archive/refs/tags/v.tar.gz, got a 404, and the
piped tar exited 2. BuildKit reports the entire RUN command in its
error, which made it look like make was the failing step.

Verified locally: with `ARG GIT_VERSION` re-declared inside the
stage, the variable expands to 2.54.0 as intended.
Dockerfile