User Story
As someone creating a sandbox from an image reference without a tag,
I want OpenShell to pull only latest, as docker pull does,
so that one sandbox doesn't download the repository's whole tag history.
Problem Statement
pull_image() in crates/openshell-driver-docker/src/lib.rs passes the reference to the Engine API as fromImage with no tag. When neither a tag nor a digest is given, the daemon pulls every tag in the repository, the same as docker pull --all-tags. The docker CLI appends :latest to a bare reference before calling the API. Given that, I'd say pulling only "latest" would follow the principle of least surprise.
With the default image_pull_policy of if_not_present, this happens the first time an untagged image is used. A reference with a tag or digest is pulled correctly. From reading the code, the Podman and VM drivers pull a single tag, but I only ran Docker.
Impact / Why This Matters
openshell sandbox create --from nicolaka/netshoot spent minutes pulling and left 20 images across 37 tags in the local store, about 9.5 GB by listed size. OpenShell used only latest. On Docker Hub, each of those tags also counts against the pull-rate limit.
The workaround is to always pass a tag, for example --from nicolaka/netshoot:v0.16. Nothing says you need to, so you only find out from docker images afterwards (and from the long image pull step in openshell sandbox create)
Acceptance Criteria
Reproduction Steps
docker rmi $(docker images nicolaka/netshoot -q) to remove local copies.
openshell sandbox create --name test-sandbox --detach --from nicolaka/netshoot
docker images nicolaka/netshoot lists every published tag, not just latest.
(The netshoot image has USER root, so the command from step #2 fails, but that's unrelated.)
Environment
- OpenShell 0.1.2 (Homebrew) on macOS 26.2 arm64, local Docker gateway. The pull code is the same on current
main.
- Docker Engine 29.4.0 (linux/arm64)
Logs
$ docker images nicolaka/netshoot
nicolaka/netshoot latest 7f199a2cf92c 3 months ago 653MB
nicolaka/netshoot v0.16 7f199a2cf92c 3 months ago 653MB
nicolaka/netshoot v0.15 e8aef26f9613 8 months ago 637MB
nicolaka/netshoot v0.14 3be5270ddd56 15 months ago 622MB
... [a bunch more]
nicolaka/netshoot v0.1 f6a4dd84d730 4 years ago 410MB
nicolaka/netshoot test 18dc8492ac15 5 years ago 367MB
nicolaka/netshoot edge f2cea5d9c42d 7 years ago 188MB
User Story
As someone creating a sandbox from an image reference without a tag,
I want OpenShell to pull only
latest, asdocker pulldoes,so that one sandbox doesn't download the repository's whole tag history.
Problem Statement
pull_image()incrates/openshell-driver-docker/src/lib.rspasses the reference to the Engine API asfromImagewith notag. When neither a tag nor a digest is given, the daemon pulls every tag in the repository, the same asdocker pull --all-tags. ThedockerCLI appends:latestto a bare reference before calling the API. Given that, I'd say pulling only "latest" would follow the principle of least surprise.With the default
image_pull_policyofif_not_present, this happens the first time an untagged image is used. A reference with a tag or digest is pulled correctly. From reading the code, the Podman and VM drivers pull a single tag, but I only ran Docker.Impact / Why This Matters
openshell sandbox create --from nicolaka/netshootspent minutes pulling and left 20 images across 37 tags in the local store, about 9.5 GB by listed size. OpenShell used onlylatest. On Docker Hub, each of those tags also counts against the pull-rate limit.The workaround is to always pass a tag, for example
--from nicolaka/netshoot:v0.16. Nothing says you need to, so you only find out fromdocker imagesafterwards (and from the long image pull step inopenshell sandbox create)Acceptance Criteria
--from <repo>with no tag or digest pulls only<repo>:latest.localhost:5000/img, where the colon isn't a tag separator.Reproduction Steps
docker rmi $(docker images nicolaka/netshoot -q)to remove local copies.openshell sandbox create --name test-sandbox --detach --from nicolaka/netshootdocker images nicolaka/netshootlists every published tag, not justlatest.(The netshoot image has
USER root, so the command from step #2 fails, but that's unrelated.)Environment
main.Logs
$ docker images nicolaka/netshoot nicolaka/netshoot latest 7f199a2cf92c 3 months ago 653MB nicolaka/netshoot v0.16 7f199a2cf92c 3 months ago 653MB nicolaka/netshoot v0.15 e8aef26f9613 8 months ago 637MB nicolaka/netshoot v0.14 3be5270ddd56 15 months ago 622MB ... [a bunch more] nicolaka/netshoot v0.1 f6a4dd84d730 4 years ago 410MB nicolaka/netshoot test 18dc8492ac15 5 years ago 367MB nicolaka/netshoot edge f2cea5d9c42d 7 years ago 188MB