This error happens during the Demo.
Env
uname -a
Linux keisuke-ubuntu-desktop 6.5.0-1016-aws #16~22.04.1-Ubuntu SMP Wed Mar 13 18:54:49 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
# Self build
ctr --version
ctr github.com/containerd/containerd/v2 v2.0.0-beta.2-452-gb6ffa2794
Error
make load
[ -f /home/ubuntu/Workspace/runwasi/dist/img.tar ] || make target/wasm32-wasi/debug/img.tar
[ -f /home/ubuntu/Workspace/runwasi/dist/img.tar ] || cp target/wasm32-wasi/debug/img.tar "dist/img.tar"
sudo ctr -n default image import --all-platforms dist/img.tar
ctr: rpc error: code = InvalidArgument desc = unable to initialize unpacker: no unpack platforms defined: invalid argument
make: *** [Makefile:195: load] Error 1
Workaround: Add --local flag since v1.7+ and run ctr image import directly.
Ref:
sudo ctr -n default image import --local --all-platforms dist/img.tar
unpacking ghcr.io/containerd/runwasi/wasi-demo-app:latest (sha256:540abaea9e27f1d5f150358fffc3b4ed7dd72a732864d78917e99d6241744ad8)...done
I wanted to add --local flag to Makefile but I've noticed runwasi supports ctr 1.6.25+ that doesn't support --local flag.
|
CTR_VERSION := $(shell sudo ctr version | sed -n -e '/Version/ {s/.*: *//p;q;}') |
|
load/oci: dist/img-oci.tar |
|
@echo $(CTR_VERSION)\\nv1.7.7 | sort -crV || @echo $(CTR_VERSION)\\nv1.6.25 | sort -crV || (echo "containerd version must be 1.7.7+ or 1.6.25+ was $(CTR_VERSION)" && exit 1) |
|
@echo using containerd $(CTR_VERSION) |
|
sudo ctr -n $(CONTAINERD_NAMESPACE) image import --all-platforms $< |
This error happens during the Demo.
Env
Error
Workaround: Add
--localflag since v1.7+ and runctr image importdirectly.Ref:
I wanted to add
--localflag to Makefile but I've noticed runwasi supports ctr1.6.25+that doesn't support--localflag.runwasi/Makefile
Lines 196 to 200 in 73df350