Build LXC, Incus and Docker images of Mageia.
Stable images are available on
Releases
page.
Testing images are available on
Actions
page.
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
$ incus image import incus.tar.xz disk.qcow2
-
GUI
virt-manager
: adddisk.qcow2
as a SATA device and set the machine in UEFI. -
CLI
qemu
tool:
$ qemu-system-x86_64
- Convert
qcow2
tovdi
:
$ qemu-img convert -f qcow2 -O vdi disk.qcow2 disk.vdi
- In VirtualBox, create an empty VM.
- Add the previously generated
disk.vdi
as a SATA device.
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
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: produce
rootfs
andmeta
data files, plusqcow2
for Incus