A lightweight template for easy deployments.
Allows builing of LXC, Incus/LXD and Docker images.
Multiple stages are needed to go from an empty filesystem to a ready-to-go Mageia.
- Craft minimal system: install core (and some extra) packages needed for the newly built system
- Compress filesystem read-only: reduce built system size
- Build for target: target specific modifications (e.g. needed packages for VM), metadata, filesystem edits
As urpmi is used to install the needed packages, it is adviced to build image from a Mageia (virtual) machine.
It should not be too hard to allow building from another host package manager.
Building process is made available through the Makefile.
Makefile target: minimal-fs
Steps:
- Initialize the RPM database for Mageia in a directory
- Add Mageia repositories in host package manager source lists
- Install OS specific packages:
mageia-release-Default,mageia-release-common,lsb-release - Install basic packages:
urpmi,locales,systemd, ...
Makefile target: squash-fs
Output is a .sqfs file.
Makefile target: build
Distrobuilder needs an image config file: mageia.yaml.
mageia.yaml describes:
- Image metadata: OS, version, arch
- Extra packages to install -> TBD
- Scripts to execute inside the new system
- Targets: vm, container, cloud, ...default
Distrobuilder is used for:
- Applying system modifications: basic config, set locale, fix symlinks, ...
- Packing for LXC/LXD: produce
rootfsandmetadata files, plusqcow2for LXD
Stable generated images are available on Releases page.
Testing generated images are available on Actions page.
Proxmox allows to run LXC containers from publicly available templates, or from an uploaded one.
On WebUI, you can import Mageia's rootfs.tar.xz by going to: Storage > CT Templates > Upload
You can then create a new container.
TDB
TDB
TBD
You can import Mageia's docker.tar.xz in registry:
$ docker import ./docker.tar.xz mageia:<version>Then test the image:
$ docker run -it mageia:<version> bash