LXC releases. Supported templates.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 30 Dec 2018 00:46:36 +0200
changeset 2317 897bb1696e5f
parent 2316 7de68fce3e7d
child 2318 2463c53f0d9e
LXC releases. Supported templates.
lxc.rst
--- a/lxc.rst	Sat Dec 29 23:23:30 2018 +0200
+++ b/lxc.rst	Sun Dec 30 00:46:36 2018 +0200
@@ -6,6 +6,24 @@
 .. contents::
    :local:
 
+LXC releases
+============
+
+https://discuss.linuxcontainers.org/tags/release
+  Announces of LXC & LXD releases.
+https://discuss.linuxcontainers.org/t/lxc-3-0-0-has-been-released/1449
+  LXC 3.0.0 has been released.
+
+Supported templates
+===================
+
+https://github.com/lxc/lxc-templates
+  Old style template scripts for LXC (prefer distrobuilder).
+https://github.com/lxc/distrobuilder
+  System container image builder for LXC and LXD.
+https://brauner.github.io/2018/02/27/lxc-removes-legacy-template-build-system.html
+  Details about replacing template stripts.
+
 Install LXC under Debian
 ========================
 ::
@@ -41,23 +59,49 @@
 Create new container in LXC
 ===========================
 
-``-t`` defines distro name, ``-n`` gives name for container for further
-referencing, ``--`` allow pass options to template script, ``-r`` specifies
-Debian release::
+Create container from template::
+
+  $ sudo lxc-create -t $TMPL -n $NAME -- $EXTRA_ARGS
 
-  $ sudo lxc-create -t debian -n debtest -- -r sid
+.. note::
+   * ``-t`` defines distro name
+   * ``-n`` gives name for container for further referencing
+   * everything after ``--`` is passed to template script
+
+Template name is based on file name from ``/usr/share/lxc/templates`` directory without ``lxc-``
+prefix.
 
-In order to use another miror::
+List available templates with::
+
+  $ ls -alh /usr/share/lxc/templates/
+
+Examples of container creation command::
 
-  $ MIRROR=http://httpredir.debian.org/debian sudo lxc-create -t debian -n debtest -- -r sid
+  $ sudo lxc-create -t debian -n deb-sid --  -r sid --enable-non-free
+  $ sudo lxc-create -t debian -n deb-testing --  -r testing
+  $ sudo lxc-create -t debian -n deb-stable --  -r stable -a amd64
 
-Getting help for template specific options::
+  $ sudo lxc-create -t alpine -n alpine-3.7 --  -r 3.7
+
+Each template has own options, which can be passed after ``--``. To get help on template specific
+options run::
 
   $ /usr/share/lxc/templates/lxc-ubuntu -h
   $ /usr/share/lxc/templates/lxc-debian -h
   $ /usr/share/lxc/templates/lxc-alpine -h
   ...
 
+For Debian in order to use another miror::
+
+  $ MIRROR=http://httpredir.debian.org/debian sudo lxc-create -t debian -n debtest -- -r sid
+
+Since LXC v3.0 sh-templates moved to separate project and only 4 are left supported::
+
+  $ lxc-create my-busybox -t busybox
+  $ lxc-create my-x -t download
+  $ lxc-create c1 -t local -- --metadata /path/to/meta.tar.xz --fstree /path/to/rootfs.tar.xz
+  $ lxc-create c2 -t oci -- --url docker://alpine
+
 Put ``veth`` network configuration into container config ``/var/lib/lxc/$NAME/config``::
 
   lxc.network.type = veth