google / google/go-containerregistry
question: How can I use crane pull to generate a tar.gz
- Dominant language
- Go
- Stars
- 4k
- Forks
- 686
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 26
Description
Hello
I am trying to rewrite an existing process for producing a tarball containing hundreds of images using `docker pull + docker save with gzip` by using `crane pull`.
Sample code showing the current process:
```shell
docker pull ubuntu:latest
docker pull python:latest
docker save ubuntu:latest python:latest| gzip > images.tar.gz
```
I was able to use `crane pull` to produce tar files quickly. Existing process using `docker pull+save with gzip` takes 30min for building an archive consisting of ~100 images, but `crane pull` is able to write the tar file in less than 2mins
```shell
crane pull ubuntu:latest python:latest images.tar
```
The idea of using crane seems very lucrative given that it saves a lot of time, however; I was wondering if there is a way that I could use to generate the tarball in tar.gz format so that even after the rewrite, the output format remains same?
Contributor guide
Research direction
Start at the `crane pull` entry point and compare its tar output with the existing `docker save ... | gzip` process described in the issue. Determine whether producing a compatible `tar.gz` archive is supported or requires a scoped CLI change; done means the output preserves the existing archive format for multiple images.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, shell
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100