`docker save` does not download image like `docker run` if it isn't already stored locally
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
docker run ... pulls an image down if it does not exist locally, however, docker save does not automatically download the image if it does not exist. For consistency, docker save should probably also automatically download the image if it's not present locally, the same way docker run does.
Steps to reproduce the issue:
- Remove an example image locally
- Attempt to save the image via
docker save -o outputfile path/to/image:version - Witness error that the image does not exist.
Describe the results you received:
docker save -o failed if the image wasn't already stored locally.
Describe the results you expected:
docker save -o should have downloaded the image if it weren't stored locally.
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
Docker version 20.10.6, build 370c289
Output of docker info:
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
scan: Docker Scan (Docker Inc.)
Server:
Containers: 3
Running: 3
Paused: 0
Stopped: 0
Images: 76
Server Version: 19.03.13
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 5.8.10-1.el7.elrepo.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 31.1GiB
Name: ip-10-113-199-224.evoforge.org
ID: SIB6:JXQ7:PHVH:T3XS:3J4Q:3SPS:XFVX:QHDK:Z3EN:TP7R:W5ZG:NBRQ
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Live Restore Enabled: false
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Additional environment details (AWS, VirtualBox, physical, etc.):
AWS
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the docker save and docker run entry points and reproduce the behavior with an image absent locally. Determine how image retrieval is handled before saving; done means docker save downloads a missing image and writes the requested output, with coverage for the reported command sequence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100