From 5116d2f56bc04afab69c3569aafffa61a56b6782 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Fri, 21 Jul 2023 22:23:14 +0200 Subject: [PATCH] chore: improved command for container creation with template --- knowledge base/lxc.md | 15 +++++++++++++-- knowledge base/turris os.md | 6 +++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/knowledge base/lxc.md b/knowledge base/lxc.md index c47029a..5944219 100644 --- a/knowledge base/lxc.md +++ b/knowledge base/lxc.md @@ -16,9 +16,20 @@ snap install 'lxd' # List available templates. ls '/usr/share/lxc/templates' +# List the options supported by templates. +lxc-create -t 'download' -h + # Create new containers. -# Use the 'download' template to choose from a list of distribution -lxc-create -n 'pi-hole' --template 'download' +# Use the 'download' template to choose from a list of distribution. +lxc-create -n 'nas' --template 'download' + +# Values are case sensitive and depend from what is on the server. +lxc-create -n 'pi-hole' -t 'download' -- \ + --server 'images.linuxcontainers.org' \ + --dist 'debian' --release 'bullseye' --arch 'armhf' --variant 'cloud' +lxc-create -n 'git' -t 'download' -- \ + --server 'repo.turris.cz/lxc' \ + -d 'Debian' -r 'Bullseye' -a 'armv7l' # Start containers. lxc-start -n 'pi-hole' diff --git a/knowledge base/turris os.md b/knowledge base/turris os.md index 4183aa7..bc0519d 100644 --- a/knowledge base/turris os.md +++ b/knowledge base/turris os.md @@ -181,8 +181,12 @@ In shell: ```sh # Default source is 'repo.turris.cz/lxc'. +# Values for the template options are case sensitive. lxc-create --name 'test' --template 'download' -lxc-create -n 'pi-hole' -t 'download' -- --dist 'debian' --release 'bullseye' --arch 'armhf' --server 'images.linuxcontainers.org' +lxc-create -n 'git' -t 'download' -- -d 'Debian' -r 'Bullseye' -a 'armv7l' +lxc-create -n 'pi-hole' -t 'download' -- + --server 'images.linuxcontainers.org' \ + --dist 'debian' --release 'bullseye' --arch 'armhf' ``` Using the WebUI: