containerd / nerdctl

contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...
Apache License 2.0
8.13k stars 604 forks source link

Is IPFS+estargz working? #3475

Open apostasie opened 1 month ago

apostasie commented 1 month ago

Description

Be sure to serve locally nerdctl ipfs registry serve --listen-registry localhost:5555 and to have a completely clean, IPFS ready environment.

Then manually start a local registry: nerdctl ipfs registry serve --listen-registry localhost:5555

And:

export CONTAINERD_SNAPSHOTTER=stargz

# Clean before
nerdctl rmi --namespace=nerdctl-test -f localhost:5555/ipfs/bafkreicztjlfrhs5aes457yyb5nnbjgsjw6wgin4krjed4f2uxqbxa5ypu
nerdctl rmi --namespace=nerdctl-test -f bafkreicztjlfrhs5aes457yyb5nnbjgsjw6wgin4krjed4f2uxqbxa5ypu

# Pull
nerdctl pull --namespace=nerdctl-test ghcr.io/stargz-containers/alpine:3.13-org
# Push
nerdctl push --namespace=nerdctl-test ipfs://ghcr.io/stargz-containers/alpine:3.13-org --estargz

############################ Comment or uncomment the following line
#nerdctl pull --namespace=nerdctl-test localhost:5555/ipfs/bafkreicztjlfrhs5aes457yyb5nnbjgsjw6wgin4krjed4f2uxqbxa5ypu
############################ ^

# Pull from ipfs
nerdctl pull --namespace=nerdctl-test ipfs://bafkreicztjlfrhs5aes457yyb5nnbjgsjw6wgin4krjed4f2uxqbxa5ypu
# Run
nerdctl run --namespace=nerdctl-test --rm ipfs://bafkreicztjlfrhs5aes457yyb5nnbjgsjw6wgin4krjed4f2uxqbxa5ypu ls /.stargz-snapshotter

It seems like pulling solely from ipfs://CID, or from the locally served registry yields different results - one of the image seems to be on stargz, but not the other.

I do not see any difference between the two images, nor the containers, but there seems to be something amiss here.

Note that the same problem appears to happen when pulling with --ipfs-address

Or am I missing something here?

Steps to reproduce the issue

na

Describe the results you received and expected

na

What version of nerdctl are you using?

main

Host information

ipfs version 0.29.0

Linux lima-v2 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:26:41 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

Ubuntu 24.04 LTS \n \l

nerdctl version 2.0.0-rc.2-45-g340ba031.m

containerd github.com/containerd/containerd/v2 v2.0.0-rc.3-211-g7b948faa0.m 7b948faa084506e72967d88b5d35423211f13b07.m
AkihiroSuda commented 1 month ago

Cc @ktock