You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
container.create in the C bindings for LXC allows a user to pass in a null pointer instead of a template name for that argument; this is used for example when you run lxc-create -t none, which allows creating a container, but without a rootfs (thus allowing for full customization of the container with config options).
The current API in this crate doesn't allow for that, as it always passes a string into the C bindings. There should be a way to create a container without a rootfs. (I'd be happy with just an additional function that invokes the bindings with a reasonable set of arguments to achieve this, but I'm not sure if that's the right design for such an interface in general.)
The text was updated successfully, but these errors were encountered:
I'd be happy with just an additional function that invokes the bindings with a reasonable set of arguments to achieve this, but I'm not sure if that's the right design for such an interface in general.
It’s probably a good idea to redesign this function with a builder:
c.create().template("download").flag(lxc::CreateFlags::QUIET).arg("-d").arg("ubuntu").arg("-r").arg("trusty").arg("-a").arg("i386")// or .args(&["-d", "ubuntu", "-r", "trusty", "-a", "i386"]).build()
container.create
in the C bindings for LXC allows a user to pass in a null pointer instead of a template name for that argument; this is used for example when you runlxc-create -t none
, which allows creating a container, but without a rootfs (thus allowing for full customization of the container with config options).The current API in this crate doesn't allow for that, as it always passes a string into the C bindings. There should be a way to create a container without a rootfs. (I'd be happy with just an additional function that invokes the bindings with a reasonable set of arguments to achieve this, but I'm not sure if that's the right design for such an interface in general.)
The text was updated successfully, but these errors were encountered: