LXD containers assistant for easy development

Hello LXD fans and devs :wave:

I’ve made a little script that a provides some alternate and extended functionality for LXD that makes it easier for devs to play with containers in other projects.

Basically it allows a set of container configs to be saved in a local directory (and shared in a Github repo for example), and then simplifies all the commands so the user doesn’t have to remember or re-type any of their project-specific configs. It includes things like automatically adding the user’s SSH key to the container and applying a pre-defined static IP to the container’s NIC during launch.

If anyone wants to play with it and give some feedback that would be great. It’s an early/alpha version (tested on Ubuntu host and LXD via snap), but I’ll be adding more bits.

P.S. thanks for making LXD/LXC! You guys are awesome :heart:


will it create container in workspace ~/Github/example-project
i mean when i share folder ~/Github/example-project other users can access to container rootfs from it?

@xlmnxp Currently you can set up a basic share by setting host_share_path and guest_share_path in the local configs and it will be mounted automatically on container launch.

At the moment the files will be read-only from the guest, but improving that is top of my to-do list:

PRs welcome :wink:

@xlmnxp Basic user mapping added here: https://github.com/libre-ops/lexi/pull/2

Shared directories are no longer read-only in the container :+1: