Feature Request: lxc --project <projectname> <command> <container> -- /bin/sh

Hey there,

I just started playing around with projects and noticed, there is no way to run commands on a specific container in a specific project from the command line client other than switching to the project first.

It would be really awesome if you could include this feature.

Is this currently possible using the API?

Thanks in advance!

This would be easy to add, the main issue we have to keep in mind with this, and the reason why we haven’t done it at release time is that we will eventually want some syntax to move/copy containers between projects and --project seemed like a good fit for this case too.

It’s currently possible in the API, just add “?project=” as query parameter in the request.