Follow-up from #76, which fixed reference resolution but deliberately left IDs out of scope.
docker rmi accepts an image ID or a short digest prefix, which is what makes the common cleanup one-liner work:
mocker images -q | xargs mocker rmi
Today ImageManager.resolve only tries reference strings (the literal ref, <name>:latest, then the normalized docker.io/library/... form). The underlying ReferenceManager.get is an exact string match on the reference, with no digest or ID lookup at all, so an ID argument always ends in No such image.
A fix would resolve an argument that looks like a digest (sha256:...) or a hex prefix against the stored images' digests, and error on an ambiguous prefix rather than picking one. mocker images -q prints short IDs, so prefix matching is the part that actually matters for the workflow above.
Follow-up from #76, which fixed reference resolution but deliberately left IDs out of scope.
docker rmiaccepts an image ID or a short digest prefix, which is what makes the common cleanup one-liner work:mocker images -q | xargs mocker rmiToday
ImageManager.resolveonly tries reference strings (the literal ref,<name>:latest, then the normalizeddocker.io/library/...form). The underlyingReferenceManager.getis an exact string match on the reference, with no digest or ID lookup at all, so an ID argument always ends inNo such image.A fix would resolve an argument that looks like a digest (
sha256:...) or a hex prefix against the stored images' digests, and error on an ambiguous prefix rather than picking one.mocker images -qprints short IDs, so prefix matching is the part that actually matters for the workflow above.