Repository navigation
[Bug]: Image stored under a short name before an upgrade shadows rebuilds of the same tag #2424
Description
I have done the following
- I have searched the existing issues
- If possible, I've reproduced the issue using the 'main' branch of this project
Steps to reproduce
To Reproduce
- With a pre-1.6 release,
container build -t finlay-ledger:latest . - Upgrade to 1.6.0.
- Change the Dockerfile and run
container build -t finlay-ledger:latest .again. The build
succeeds, and its output ends withdocker.io/library/finlay-ledger:latest. container run --rm -it finlay-ledger:latest cat /etc/os-release
Expected
The rebuild replaces the image, since finlay-ledger:latest and
docker.io/library/finlay-ledger:latest are the same reference. run starts the new image.
Actual
run starts the image from step 1. container image list shows two entries that look identical:
finlay-ledger latest ca10f5bc20d6
finlay-ledger latest 53329f77de70
container image list --format json (trimmed) shows that they're stored under different names:
[
{
"configuration": {
"creationDate": "2026-10-22T14:43:37Z",
"descriptor": {
"annotations": {
"com.apple.containerization.image.name": "docker.io/library/finlay-ledger:latest",
"io.containerd.image.name": "docker.io/library/finlay-ledger:latest"
},
"digest": "sha256:ca10f5bc20d64a930ed5d7e9e4a012182ea8626e781e28128407e249a25fc182"
},
"name": "docker.io/library/finlay-ledger:latest"
}
},
{
"configuration": {
"creationDate": "2026-08-19T17:21:29Z",
"descriptor": {
"annotations": {
"com.apple.containerization.image.name": "finlay-ledger:latest",
"io.containerd.image.name": "docker.io/library/finlay-ledger:latest"
},
"digest": "sha256:53329f77de70678fc2a94d939841c9acd3612bb805c73d20e24fec0b1ead7988"
},
"name": "finlay-ledger:latest"
}
}
]On the old entry, io.containerd.image.name already has the full name, but
com.apple.containerization.image.name and configuration.name don't. It looks like an earlier
release stored images under the name as typed, and 1.6.0 doesn't treat that entry as the same image
when tagging a new build. A lookup by the short name then matches the old entry exactly.
Nothing in the output warns about this: the build reports success and the list shows the same name
and tag twice.
Problem description
Workaround
Delete both entries, then rebuild:
container image delete finlay-ledger:latest docker.io/library/finlay-ledger:latest
container build -t finlay-ledger:latest .
Suggested fix
Expand image names to the full form on lookup and when tagging, so short-name entries left by older
releases get replaced, or migrate them when the store is opened. At the least, build could warn
when it leaves a second image with the same name.
Environment
- container CLI version 1.6.0 (build: release, commit: ca4884f)
- macOS 27.0.1, Apple silicon (arm64)
- The stale image was built on 2026-08-19 with an earlier release (exact version unknown)Code of Conduct
- I agree to follow this project's Code of Conduct
Activity
Normalize legacy short image names before tagging
mkaindl commentedon Oct 30, 2026
This is a rather serious issue IMO. Because of it, I ran an outdated image for a week without noticing. The release notes do not mention this naming change at all.