Skip to content

Instantly share code, notes, and snippets.

@rajatjindal
Last active March 5, 2024 08:06
Show Gist options
  • Select an option

  • Save rajatjindal/bba05cd9cff3963dd2358be15dba0f25 to your computer and use it in GitHub Desktop.

Select an option

Save rajatjindal/bba05cd9cff3963dd2358be15dba0f25 to your computer and use it in GitHub Desktop.
build containerd static hack

Build containerd binary to run inside k3d node

go build -o containerd -tags 'static_build libsqlite3 ctrd apparmor seccomp netgo osusergo providerless urfave_cli_no_docs selinux' -gcflags=all= -ldflags '-w -s -extldflags '\''-static -lm -ldl -lz -lpthread'\'''  cmd/containerd/main.go

Copy containerd into k3d nodes

for c in `docker ps | grep containerd-wasm-shims | awk '{print $1}'`; do docker cp containerd $c:/bin/containerd; done
Successfully copied 58.1MB to e1b090f3fa80:/bin/containerd
Successfully copied 58.1MB to 4aa53650f25f:/bin/containerd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment