Some tutorials (such as the Getting Started on linuxcontainers.org) recommend the use of a double-hyphen (
--) when using
lxc exec to run a program inside a LXD container, as in
$ lxc exec my-container -- apt update
lxc exec to pass provided flags to the program, because e.g.
lxc exec my-container apt list --upgradable fails with
error: flag provided but not defined: --upgradable
However, I can't find any documentation on the issue. Can someone confirm, or clarify if that's not exactly what it does?
Also, I saw instances where people use
-- in different places, e.g.:
$ lxc exec my-container apt -- list --upgradable $ lxc exec my-container apt list -- --upgradable
What's the difference?