Stream Docker image tarball to disk directly instead of in memory
See original GitHub issueI’m attempting to create a tarball of an existing Docker image via the https://docker-py.readthedocs.io/en/stable/images.html save example. When attempting to write the data to disk, I get MemoryError
during the writing process.
The image is 1.516GB so I’m assuming we are running out of memory (this process is within a container).
Can the save be done directly to disk and avoid being pushed into memory?
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
docker save - Docker Documentation
docker save: Produces a tarred repository to the standard output stream. ... Save one or more images to a tar archive (streamed to...
Read more >Pull container images faster with partial pulls | Enable Sysadmin
The new storage model attempts to use disk space better and reduce memory consumption. Pulls may be more efficient and therefore quicker, too....
Read more >Moving Docker Containers and Images Around - Giant Swarm
Docker supports two different types of methods for saving container images to a single tarball: docker export - saves a container's running or...
Read more >Error processing tar file(exit status 1): unexpected EOF
docker -compose passes the context to the engine as a tar file, therefore, the build command was packing a tar (the .dump file)...
Read more >Create and upload a Docker image with a Dockerfile
Overview Dockerfiles are text files that store the commands you would execute on the command line inside a container to create a Docker...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We should provide a streaming option. You can try the following code excerpt in the meantime:
Just wanted to say - I read the messages, and it’s on my radar - should be a simple fix. Thanks everyone for the reports.