From 3fb31b91c29512652b5caeb8de45f02c93968a6c Mon Sep 17 00:00:00 2001 From: Yan Song Date: Wed, 15 Mar 2023 03:46:51 +0000 Subject: [PATCH] nydusify: forcibly enabled `--oci` option when `--oci-ref` be enabled We need to forcibly enable `--oci` option for allowing to append related annotation for zran image, otherwise an error be thrown: ``` merge nydus layers: invalid label containerd.io/snapshot/nydus-ref=: invalid checksum digest format ``` Signed-off-by: Yan Song --- contrib/nydusify/cmd/nydusify.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/nydusify/cmd/nydusify.go b/contrib/nydusify/cmd/nydusify.go index 4c1c5bad45d..dd0b1859151 100644 --- a/contrib/nydusify/cmd/nydusify.go +++ b/contrib/nydusify/cmd/nydusify.go @@ -458,6 +458,12 @@ func main() { docker2OCI = true } + // Forcibly enable `--oci` option when `--oci-ref` be enabled. + if c.Bool("oci-ref") { + logrus.Warn("forcibly enabled `--oci` option when `--oci-ref` be enabled") + docker2OCI = true + } + opt := converter.Opt{ WorkDir: c.String("work-dir"), NydusImagePath: c.String("nydus-image"),