From f10782c79dd8baf0a5e8509940a34bb92cd3344e Mon Sep 17 00:00:00 2001 From: YuQiang Date: Wed, 13 Mar 2024 20:07:27 +0800 Subject: [PATCH] docs: add doc for nydusify commit command Signed-off-by: YuQiang --- docs/nydusify.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/nydusify.md b/docs/nydusify.md index ff8cb146325..0da352b0562 100644 --- a/docs/nydusify.md +++ b/docs/nydusify.md @@ -204,6 +204,28 @@ nydusify copy \ It supports copying OCI v1 or Nydus images, use the options `--all-platforms` / `--platform` to copy the images of specific platforms. +## Commit nydus image from container's changes + +The nydusify commit command can commit a nydus image from a nydus container, like `nerdctl commit` command. + +``` shell +nydusify convert \ + --source myregistry/repo:tag \ + --target myregistry/repo:tag-nydus + +nerdctl --snapshotter nydus run \ + -dt myregistry/repo:tag-nydus sh + +nydusify commit \ + --container containerID + --target myregistry/repo:tag-nydus-committed + +nerdctl --snapshotter nydus run \ + -dt myregistry/repo:tag-nydus-committed sh +``` + +The original container ID need to be a full container ID rather than an abbreviation. + ## More Nydusify Options See `nydusify convert/check/mount --help`