An actively maintained listing of customized LXC images
This project aim is to build and share many LXC images for use on Proxmox Virtual Environments (or any other environments supporting LXCs).
Lets avoid over-containerization (Docker/Postman in LXC) and over-virtualization (Docker/Postman on vms).
Lets simply use native LXCs instead.
All images available here are generated using distrobuilder along with dedicated YAML definitions files.
The build themselves can be seen in this repo's actions. Images are generated and shared in an object store accessible via the listing website.
This started as a personal project built for my own needs, then shared because it could help someone else (hopefully..).
Open an issue to submit the application details and we will try to add it as soon as possible.
It is very straight forward to add a new build template:
-
Create a distrobuilder template
- Check the
templates/
directory to see some examples of already existing builds (you can take the templatetemplates/apisix.yml
as a solid example). - Check the distrobuilder docs about how to use the keys
files
andactions
to see all possibilities available to you. Only both are using distrobuilder directly. Other keys likerepositories
andpackages
are preprocessed before to be used by distrobuilder but are pretty easy to use (againtemplates/apisix.yml
is a good example about how it works). - Give the metadata info below (all fields are required)
- name (str)
- get_version_command (str)
- description (str)
- categories (str)
- project_source (str)
- distribution (str)
- release (str)
- architectures (list)
- Name your file according to the application name
- That it, the automation will do the rest !
- Check the
[Step 1] Install requirements:
- Install distrobuilder
- Install KCL
- Install yq (optional)
- Install jq (optional)
[Step 2] Create your LXC template (check the templates/
directory to see the already existing examples) or select an existing one
Note: the base template already has some packages in its definition so you don't need to add them twice, those packages are:
- fuse
- openssh-server
- lsb-release
- openssl
- ca-certificates
- apt-transport-https
- cloud-init
- curl
- wget
- gnupg2
- gzip
- vim
- software-properties-common
- tzdata
[ Step 3] Run the following command to build the final LXC template
# Render to final LXC template
kcl run __layout.k -D input=templates/<template_filename>.yml > _lxc-template.yml
# ie: kcl run __layout.k -D input=templates/apisix.yml > apisix-template.yml
Check the content of _lxc-template
file to verify all is as expected. It should contains the conplete configuration (based on __layout.k
and the application specific inputs.)
# Build your LXC image
# Do not work if executed into a container (need chroot)
sudo distrobuilder build-lxc _lxc-template.yml -o image.architecture=amd64 -o image.serial="<application version>"
# ie: sudo distrobuilder build-lxc apisix-template.yml -o image.architecture=amd64 -o image.serial="3.8.0"