fix(dockerfile): fix matching of base images to local Dockerfiles by stripping registry prefixes when comparing image references

This commit is contained in:
2026-02-04 14:01:57 +00:00
parent 36f06cef09
commit 7b7064864e
3 changed files with 46 additions and 4 deletions

View File

@@ -1,5 +1,12 @@
# Changelog
## 2026-02-04 - 1.4.3 - fix(dockerfile)
fix matching of base images to local Dockerfiles by stripping registry prefixes when comparing image references
- Added Dockerfile.extractRepoVersion(imageRef) to normalize image references by removing registry prefixes (detects registries containing '.' or ':' or 'localhost').
- Use extractRepoVersion when checking tagToDockerfile and when mapping local base dockerfiles to ensure comparisons use repo:tag keys rather than full registry-prefixed references.
- Prevents mismatches when baseImage includes a registry (e.g. "host.today/repo:version") so it correctly matches a local cleanTag like "repo:version".
## 2026-01-21 - 1.4.2 - fix(classes.dockerfile)
use a single top-level fs import instead of requiring fs inside methods