Skip to content

Commit

Permalink
do not load useless image
Browse files Browse the repository at this point in the history
Signed-off-by: fahed dorgaa <fahed.dorgaa@gmail.com>
  • Loading branch information
fahedouch committed Sep 13, 2021
1 parent 04bc79a commit 7bc591a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/nerdctl/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"os"

"github.com/containerd/containerd"
"github.com/containerd/containerd/images/archive"
"github.com/containerd/containerd/platforms"
"github.com/urfave/cli/v2"
)
Expand Down Expand Up @@ -66,7 +65,7 @@ func loadImage(in io.Reader, clicontext *cli.Context) error {
defer cancel()

sn := clicontext.String("snapshotter")
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")))
if err != nil {
return err
}
Expand Down

0 comments on commit 7bc591a

Please sign in to comment.