ctr-remote: fix "-t" flag is not defined for images optimize by bettermultiply · Pull Request #2186 · containerd/stargz-snapshotter (original) (raw)

Problem
When following tutorial in docs/ctr-remote.md, I tried command below and got hint: Incorrect Usage: flag provided but not defined: -t. And I clone the main branch and reporduce the same error. The error seems to be the error usage of urfave/cli

# ctr-remote i optimize -t -i --oci --entrypoint='[ "/bin/bash", "-c" ]' --net-host --args='[ "ip a && curl example.com" ]' ghcr.io/stargz-containers/centos:8-test registry2:5000/centos:8-test-esgz

Solution
The original usage is:

Name: "command,subcommand",

change it into:

Name:    "command",
Aliases: []string{"subcommand"},