Skip to content

Instantly share code, notes, and snippets.

View AnthonyDiSanti's full-sized avatar

Anthony DiSanti AnthonyDiSanti

  • Shift Markets
  • Miami, NY
View GitHub Profile
@AnthonyDiSanti
AnthonyDiSanti / host-ctr-pull-unpack.patch
Created September 23, 2026 15:53
Bottlerocket host-ctr lease-safe pull/unpack candidate for issue #1059
diff --git a/sources/host-ctr/cmd/host-ctr/main.go b/sources/host-ctr/cmd/host-ctr/main.go
index 1f90d26..2ec6b2d 100644
--- a/sources/host-ctr/cmd/host-ctr/main.go
+++ b/sources/host-ctr/cmd/host-ctr/main.go
@@ -983,6 +983,9 @@ func pullImage(ctx context.Context, source string, client *containerd.Client, re
pullOpts := []containerd.RemoteOpt{
withDynamicResolver(ctx, source, registryConfig),
containerd.WithSchema1Conversion,
+ // Lease cached layers while unpacking so GC cannot remove a parent before container creation.
+ containerd.WithPullUnpack,
#!/bin/sh
echo "What should the Application be called (e.g. Google Calendar)?"
read inputline
name="$inputline"
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url="$inputline"