Bind mounting for cloned containers is too hard; provide equivalent of lxc-start-ephemeral --bind option
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
In order to efficiently exchange data with a test bed in a container, I make ample use of lxc-start-
The problem is that with lxc-clone and lxc-start there is no counterpart at all for the --bdir option. So to do the equivalent thing, one needs to detect the LXC path (lxc-config lxc.lxcpath), make assumptions about the file layout in the container dir (/rootfs, /config), manually mkdir -p the bind mount path, and add the bind mount to config. This feels like poking around in internals way too much and thus not very future-proof, and it's also a lot of effort:
http://
Could lxc-clone or lxc-start grow a --bdir option as well, to make this simpler and keep the knowledge of paths and file layouts within LXC itself?
You could use something like: entry=/ path/on/ host path/in/container none bind,create=dir 0 0"
lxc-start -n my-container -s "lxc.mount.
Which will bind-mount /path/on/host to <rootfs> /path/in/ container and create the target path if missing.