Scripts to simplify creating LXC containers on Turris Omnia router.
- define env vars
- Linux distribution
$ export lxc_dist=Debian - release version of aforementioned Linux distribution
$ export lxc_release=Bookworm - name of container (is set as hostname in it too)
$ export lxc_app=my-app - OPTIONAL: MAC address to be given to container (i.e. for assigning stable IP/hostname)
$ export lxc_mac='XX:XX:XX:XX:XX:XX:'
- Linux distribution
- OPTIONAL:
in./${lxc_app}/, create any files that should be copied inside the container after its creation
If there is./${lxc_app}/usr/sbin/init.shexecutable file it will be run inside the container after it is created.
If there is./${lxc_app}/usr/sbin/post-init.shexecutable file it will be run inside the container after init is finished and container rebooted. - run the script
$ ./init-container.sh