Fix image output#357
Merged
AkihiroSuda merged 1 commit intocontainerd:masterfrom Sep 28, 2021
Merged
Conversation
73f5ddb to
7bc591a
Compare
ktock
requested changes
Sep 14, 2021
Comment on lines
+69
to
+68
| imgs, err := client.Import(ctx, in, containerd.WithDigestRef(archive.DigestTranslator(sn)), containerd.WithAllPlatforms(clicontext.Bool("all-platforms"))) | ||
| imgs, err := client.Import(ctx, in, containerd.WithAllPlatforms(clicontext.Bool("all-platforms"))) |
Member
There was a problem hiding this comment.
This change makes all non-tagged images loaded by nerdctl load get GC-ed immediately.
Example:
nerdctl pull busybox:latest
nerdctl save busybox:latest > /tmp/busybox.tar
mkdir /tmp/busybox
tar -C /tmp/busybox -xf /tmp/busybox.tar
jq 'del(.manifests[].annotations)' /tmp/busybox/index.json > /tmp/busybox/index.json.back
mv /tmp/busybox/index.json.back /tmp/busybox/index.json
jq 'del(.[].RepoTags)' /tmp/busybox/manifest.json > /tmp/busybox/manifest.json.back
mv /tmp/busybox/manifest.json.back /tmp/busybox/manifest.json
(...clear containerd cache...)
tar -C /tmp/busybox/ -c . | nerdctl load
(no image loaded here)
Member
|
I believe containerd/containerd#5997 will be needed for solve it. PTAL. |
Member
|
Merged |
Member
Author
|
thank you @AkihiroSuda , waiting for next containerd release to update the PR. |
Member
@fahedouch Do we need to wait for the next release? That patch changes only client library so we can work on it with the main branch of containerd. |
Member
|
@ktock Would you be interested in carrying this PR? |
Member
Author
|
@AkihiroSuda @ktock |
Member
|
Thanks @fahedouch , yes, please |
Member
|
Thanks @fahedouch ! |
ef07255 to
6619357
Compare
Signed-off-by: fahed dorgaa <[email protected]>
6619357 to
c8537da
Compare
Member
Author
|
@ktock @AkihiroSuda is it good ? |
ktock
approved these changes
Sep 28, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
avoid creating digest images for each manifest in the index.
fixing #177