[PR #20] [MERGED] fix(techdocs-builder): move FINAL_BASE ARG to global scope #21

Closed
opened 2026-06-08 09:03:28 +00:00 by ryangr0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/webgrip/infrastructure/pull/20
Author: @Copilot
Created: 5/30/2026
Status: Merged
Merged: 5/30/2026
Merged by: @Ryangr0

Base: mainHead: copilot/fix-failing-github-actions-job


📝 Commits (2)

  • 4f37e77 Initial plan
  • 5e8d739 fix(techdocs-builder): move FINAL_BASE ARG to global scope before first FROM

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 ops/docker/techdocs-builder/Dockerfile (+2 -1)

📄 Description

ARG FINAL_BASE was declared inside the openjdk build stage (after FROM eclipse-temurin:), making it stage-scoped. Docker requires ARGs referenced in FROM instructions to be declared before the first FROM (global scope), causing BuildKit to treat the variable as undefined and blank.

Changes

  • ops/docker/techdocs-builder/Dockerfile: Moved ARG FINAL_BASE=... to line 1, before the first FROM — matching the pattern already used by act-runner and helm-deploy Dockerfiles. Also corrected the Alpine tag from 3.23 (floating) to 3.23.3 to align with the pinned sha256 digest used across all other images in this repo.
# Before (broken — inside openjdk stage)
FROM eclipse-temurin:11.0.31_11-jre-alpine@sha256:... AS openjdk
...
ARG FINAL_BASE=alpine:3.23@sha256:...   ← stage-scoped, invisible to FROM
FROM ${FINAL_BASE} AS final             ← FINAL_BASE resolves to blank

# After (fixed — global scope)
ARG FINAL_BASE=alpine:3.23.3@sha256:...  ← global scope
FROM node:24-alpine3.20@sha256:... AS node
...
FROM ${FINAL_BASE} AS final              ← resolves correctly

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/webgrip/infrastructure/pull/20 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 5/30/2026 **Status:** ✅ Merged **Merged:** 5/30/2026 **Merged by:** [@Ryangr0](https://github.com/Ryangr0) **Base:** `main` ← **Head:** `copilot/fix-failing-github-actions-job` --- ### 📝 Commits (2) - [`4f37e77`](https://github.com/webgrip/infrastructure/commit/4f37e771330df132840da8a81a9cef2d9fc8a360) Initial plan - [`5e8d739`](https://github.com/webgrip/infrastructure/commit/5e8d7391996bd690a6302efd5a09a9efdb2df2e5) fix(techdocs-builder): move FINAL_BASE ARG to global scope before first FROM ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `ops/docker/techdocs-builder/Dockerfile` (+2 -1) </details> ### 📄 Description `ARG FINAL_BASE` was declared inside the `openjdk` build stage (after `FROM eclipse-temurin:`), making it stage-scoped. Docker requires ARGs referenced in `FROM` instructions to be declared before the first `FROM` (global scope), causing BuildKit to treat the variable as undefined and blank. ## Changes - **`ops/docker/techdocs-builder/Dockerfile`**: Moved `ARG FINAL_BASE=...` to line 1, before the first `FROM` — matching the pattern already used by `act-runner` and `helm-deploy` Dockerfiles. Also corrected the Alpine tag from `3.23` (floating) to `3.23.3` to align with the pinned sha256 digest used across all other images in this repo. ```dockerfile # Before (broken — inside openjdk stage) FROM eclipse-temurin:11.0.31_11-jre-alpine@sha256:... AS openjdk ... ARG FINAL_BASE=alpine:3.23@sha256:... ← stage-scoped, invisible to FROM FROM ${FINAL_BASE} AS final ← FINAL_BASE resolves to blank # After (fixed — global scope) ARG FINAL_BASE=alpine:3.23.3@sha256:... ← global scope FROM node:24-alpine3.20@sha256:... AS node ... FROM ${FINAL_BASE} AS final ← resolves correctly ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
webgrip/infrastructure#21
No description provided.