Repository navigation
Fix registry-port references in FROM and children - #130
Conversation
tianon
left a comment
There was a problem hiding this comment.
Nice, this seems solid/correct to me! Good catch!
I'm curious though, what's your use case? (This doesn't affect any of our builds or processes right now, as evidenced by it being an issue for years. 😂)
|
Thanks! This came from testing port-qualified registry references; I don't have an affected docker-library build to point to. The case is an untagged base such as |
|
Yeah fair, thanks for sharing -- merging because it's correct (even though it doesn't affect us). 👍 I can't make any regression promises here, but hopefully the tests do well enough (they're the strongest evidence of correctness here ❤️) |
Summary
:latestto Dockerfile parents.bashbrew childrenrepository arguments that include a registry port or digest.Reproduction
With
FROM registry.example:5000/team/base,bashbrew from examplepreviously printed the untagged reference andbashbrew children registry.example:5000/team/basefailed to resolve the repository. The commands now useregistry.example:5000/team/base:latestand identify the dependent image.Verification
go test -race ./...(Linux, Go 1.24.0)go vet ./pkg/dockerfile ./cmd/bashbrew(Linux, Go 1.24.0)git diff --check