Skip to content

fix(docker): skip references to earlier build stages - #616

Open
badrisatyam1-ctrl wants to merge 1 commit into
vibgrate:mainfrom
badrisatyam1-ctrl:codex/skip-docker-stages
Open

badrisatyam1-ctrl wants to merge 1 commit into
vibgrate:mainfrom
badrisatyam1-ctrl:codex/skip-docker-stages

Conversation

@badrisatyam1-ctrl

Copy link
Copy Markdown
Contributor

Closes #588

Track case-insensitive Dockerfile stage aliases and avoid treating FROM build stage references as Docker Hub images.

Validation: git diff --check passed; Node tests unavailable locally.

@vibgrate-team

Copy link
Copy Markdown
Contributor

Thanks for putting this together, @badrisatyam1-ctrl. Skipping FROM <stage> references is exactly the right fix.

The same change is already in review in #602, which also adds regression tests and covers one edge case this version misses: because the AS name is recorded before the check, a line like FROM node AS node would skip a real base image. Docker only treats names declared by an earlier stage as stage references.

To avoid two overlapping fixes, we'll land #602 for this one. A review on #602 is very welcome if you'd like to help, and issues labelled good first issue have more open items. We'll leave this PR open for now so you can follow along.

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.

Bug: FROM <earlier-stage> in a multi-stage Dockerfile is reported as a Docker Hub image

2 participants