我正在尝试使用lxc-create(v2.0.5)创建容器。我没有安装gpg,也不希望安装它(嵌入式系统,没有GPLv3)。我已经尝试了--no-validate
选项,但lxc-create表示它不存在,但它在帮助打印输出中将其显示为一个选项。有什么想法吗?
# lxc-create -t download -n main --no-validate
lxc-create: unrecognized option '--no-validate'
Usage: lxc-create --name=NAME --template=TEMPLATE [OPTION...]
lxc-create creates a container
Options :
-n, --name=NAME NAME of the container
-f, --config=CONFIG Initial configuration file
-t, --template=TEMPLATE Template to use to setup container
-B, --bdev=BDEV Backing store type to use
--dir=DIR Place rootfs directory under DIR
Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.
See the lxc-create man page for further information.
LXC container image downloader
Optional arguments:
[ --variant <variant> ]: Variant of the image (default: "default")
[ --server <server> ]: Image server (default: "images.linuxcontainers.org")
[ --keyid <keyid> ]: GPG keyid (default: 0x...)
[ --keyserver <keyserver> ]: GPG keyserver to use
[ --no-validate ]: Disable GPG validation (not recommended)
[ --flush-cache ]: Flush the local copy (if present)
[ --force-cache ]: Force the use of the local copy even if expired
答案 0 :(得分:4)
“ - no-validate”不是“lxc-create”的选项,而是“下载”模板的选项。
“下载”模板选项必须在“ - ”之后指定:
lxc-create -t download -n main -- --no-validate