The project is an implementation of additional layer store plugin of CRI-O/Podman, it provides CRI-O/Podman with the ability to lazy mount nydus images.
- Build store plugin
$ git clone https://github.com/containers/nydus-storage-plugin.git
$ cd nydus-storage-plugin
$ go build cmd/store/main.go
- Install nydusd
Download nydus binaries from nydus release page, and then install with the command below:
$ tar xzvf nydus-static-$version-linux-amd64.tgz
$ sudo mv nydus-static/nydusd-fusedev /usr/bin/nydusd
$ sudo mv nydus-static/nydusify /usr/bin/nydusify
$ sudo mv nydus-static/nydus-image /usr/bin/nydus-image
- Configure podman
Replace /etc/containers/storage.conf
with misc/storage.conf
.
Make sure you have created the directory with mkdir -p /var/lib/nydus-store/store
.
- Run store plugin
Copy misc/nydusd-config.json
to /etc
.
$ make build
$ sudo bin/nydus-store --log-to-stdout --log-level debug --config-path /etc/nydusd-config.json --root /var/lib/nydus-store
- Convert a nydus image
# Prepare a local registry
$ podman run -d -it -p 5000:5000 --name registry docker.io/library/registry:2
# Convert OCI v1 image to nydus image:
$ sudo nydusify convert --source ubuntu --target localhost:5000/ubuntu:latest-nydus
- Run container with nydus image
$ sudo podman run -it --tls-verify=false --rm localhost:5000/ubuntu:latest-nydus /bin/bash