Skip to content

Inline buildx global build and target platform envvars when resolving base image and user#1169

Open
trxcllnt wants to merge 1 commit intodevcontainers:mainfrom
trxcllnt:fix/275
Open

Inline buildx global build and target platform envvars when resolving base image and user#1169
trxcllnt wants to merge 1 commit intodevcontainers:mainfrom
trxcllnt:fix/275

Conversation

@trxcllnt
Copy link
Contributor

This PR ensures the buildkit global platform ARGs are respected in findBaseImage() and findUserStatement() functions.

These variables are valid in FROM lines, e.g.:

FROM ubuntu:latest as base-amd64
ENV MY_ARCH=amd64

FROM ubuntu:latest as base-arm64
ENV MY_ARCH=arm64

FROM base-${TARGETARCH}

ARG TARGETARCH

Without this change, the devcontainers CLI attempts to pull an image named base- rather than continue to walk the FROM tree to find ubuntu:latest.

Fixes #275

@trxcllnt trxcllnt requested a review from a team as a code owner March 11, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

findBaseImage in dockerfileUtils.ts does not handle buildkit automatic variables in layers name

1 participant