diff options
Diffstat (limited to 'users/fcuny/exp')
-rw-r--r-- | users/fcuny/exp/containerd-to-vm/cmd/c2vm/main.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/users/fcuny/exp/containerd-to-vm/cmd/c2vm/main.go b/users/fcuny/exp/containerd-to-vm/cmd/c2vm/main.go index 4d0968b..5e9fbb0 100644 --- a/users/fcuny/exp/containerd-to-vm/cmd/c2vm/main.go +++ b/users/fcuny/exp/containerd-to-vm/cmd/c2vm/main.go @@ -42,6 +42,12 @@ func main() { defer client.Close() ctx := namespaces.WithNamespace(context.Background(), defaultNamespace) + ctx, done, err := client.WithLease(ctx) + if err != nil { + log.Fatalf("failed to get a lease: %v", err) + } + defer done(ctx) + image, err := client.Pull(ctx, *containerName, containerd.WithPlatformMatcher(platform)) if err != nil { log.Fatalf("failed to pull the container %s: %v\n", *containerName, err) |