Configuring the image
The image is configured using a YAML configuration file and the apm system image build command.
Basic config
The initial file from which the configuration starts is /etc/apm/image.yml.
apm system image build applies changes to the current container based on the settings in image.yml.
Clarification
When creating an image in CI/CD, the configuration file is copied or mounted using Containerfile from the repository to the container via the aforementioned path.
Example
ALT Atomic Core:
image: ${{ Env.IMAGE }}
modules:
- name: Set repos
type: repos
body:
branch: sisyphus
date: ${{ Env.YEAR }}/${{ Env.MONTH }}/${{ Env.DAY }}
clean: true
- type: packages
body:
update: true
upgrade: true
- name: Set branding
type: branding
body:
name: alt-atomic-${{ Env.IMAGE_NAME }}
build-type: ${{ Env.IMAGE_TYPE }}
- name: Copy root
type: copy
body:
source: root
destination: /
replace: true
- type: include
body:
targets:
- packages.yml
- network.yml
- apt-rpm.yml
- filesystem.yml
- systemd.yml
- settings.yml
- passwd.yml
- disable-bins.yml
- name: Configurate grub
type: shell
body:
command: scripts/grub.sh
- name: Update kernel
type: kernel
body:
kernel-info:
flavour: std-def
modules:
- drm
initrd:
method: dracut
- name: Cleanup
type: include
body:
targets:
- cleanup.ymlFields of the configuration file
Legend
! — required field
| Field | Type | Description |
|---|---|---|
image | string | Base image to use (reference to the container). |
modules | module[] | List of modules. |
env | map<string, string> | Environment variables. Can be used in any module. |
image is a required field when using apm s i apply or apm s i update.
Modules (modules)
Array of modules for execution.
! marks required fields. Boolean fields default to false; lists are YAML sequences, and map<string, string> is a mapping of strings. Quote string versions and dates, for example "0.7.1" and "2026-11-08". Module-specific fields belong inside body.
| Field | Type | Description |
|---|---|---|
name | string | The name of the module for logging. |
type! | string | The type of the module body. |
id | string | The module identifier. For more details, see the section "Module Identifier". |
env | map<string, string> | Environment variables for the module. They can only be used within the scope of this module. |
if | string | Condition in the Expr language format. |
body! | object | Module body. |
output | map<string, string> | Data for output. |
Module Identifier (id)
The identifier allows you to access the module to obtain the values of the following fields:
- Name (
name) - Type (
type) - Identifier (
id) - Result of the conditional expression (
if) - Output data (
output)
Branding (branding)
The branding module installs branding packages and configures os-release and OS metadata.
| Field | Type | Description |
|---|---|---|
name | string | Branding name for branding-<name>-* packages. |
subpackages | string[] | Branding subpackages; defaults to all. Requires name. |
release-overrides | map<string, string> | os-release overrides. An empty string removes a field. |
build-type | string | Build type: stable (default), nightly, or another development type. |
metainfo | object | OS metadata for generating .metainfo.xml. |
On classic systems, release-overrides updates /etc/os-release, falling back to /usr/lib/os-release when absent. Atomic normalization applies only to atomic systems, when installing the release subpackage or specifying release-overrides.
OS metadata
Translation keys: C for the original text, other keys for locales (ru, en, etc.). description uses AppStream XML markup: p, ul, ol, li.
| Field | Type | Description |
|---|---|---|
name | map<string, string> | OS name. Missing C defaults to NAME from os-release. |
summary | map<string, string> | Short description. Missing C defaults to NAME. |
description | map<string, string> | Description with XML markup. |
variants | object[] | Image variants. |
latest-release | object | Latest release information. |
variants subsection (list; x-variants in XML):
| Field | Type | Description |
|---|---|---|
image | string | Container image reference. |
name | map<string, string> | Variant name. |
summary | map<string, string> | Short variant description. |
description | map<string, string> | Variant description with XML markup. |
latest-release schema:
| Field | Type | Description |
|---|---|---|
version | string | Release version; defaults to VERSION_ID from os-release. |
date | string | Release date (YYYY-MM-DD). |
description | map<string, string> | Release description with XML markup. |
The remaining XML fields are generated automatically:
| XML field | Source |
|---|---|
component/@type | operating-system |
id | OS ID according to AppStream (appstreamcli sysinfo) |
url type="homepage" | HOME_URL |
developer/@id | Reverse domain of VENDOR_URL |
developer/name | VENDOR_NAME; the developer block is omitted without it |
metadata_license | FSFAP |
If an operating-system component with this ID is found in local metainfo or AppStream catalogs, XML generation is skipped when metainfo is absent; if it is specified (including {}), a conflict error is returned. Otherwise, /usr/share/metainfo/<id>.metainfo.xml is created using the YAML settings and defaults from os-release. Branding installation and os-release changes take place before this check.
Example: ALT Atomic Onyx metadata
modules:
- type: branding
body:
name: alt-atomic-onyx
release-overrides:
NAME: ALT Atomic Onyx
HOME_URL: https://alt-atomic.org/
VENDOR_URL: https://alt-atomic.org/
VENDOR_NAME: ALT Atomic Team
metainfo:
name:
ru: ALT Atomic Оникс
summary:
C: Atomic desktop operating system with GNOME
ru: Атомарная настольная ОС с GNOME
description:
C: |
<p>ALT Atomic Onyx is an atomic operating system with GNOME.</p>
ru: |
<p>ALT Atomic Onyx — атомарная операционная система с GNOME.</p>
variants:
- image: altlinux.space/alt-atomic/onyx/stable:latest
name:
C: ALT Atomic Onyx
summary:
C: Default GNOME image
- image: altlinux.space/alt-atomic/onyx-nvidia/stable:latest
name:
C: ALT Atomic Onyx (NVIDIA)
summary:
C: Image with NVIDIA drivers
latest-release:
version: "0.7.1"
date: "2026-11-08"
description:
C: |
<p>Updated system components.</p>name.C defaults to NAME. The example assumes that no OS component with the same ID is installed.
Copying (copy)
The copy module is designed for copying files and directories.
Legend
! — required field
| Field | Type | Description |
|---|---|---|
source! | string | Path to the file to copy. |
destination! | string | Path to the file to copy to. |
replace | boolean | Whether to replace destination. |
Example
ALT Atomic Core:
- name: Copy root
type: copy
body:
source: root
destination: /
replace: trueGit (git)
The git module is designed to work with Git repositories: installing dependencies, building, installing the results of the work in the system, and so on.
Legend
! — required field
| Field | Type | Description |
|---|---|---|
url! | string | URL of the git repository. |
command! | string | Commands to execute relative to the git repository. |
build-deps | string[] | Dependencies for the build. They will be removed after the module is completed. |
deps | string[] | Dependencies for the program itself. They will not be removed after the module is completed, even if specified in build-deps. |
rev | string | Git revision. |
quiet | boolean | Hides command output. |
Including other configs (include)
The include module is intended for including other configurations.
Legend
! — required field
| Field | Type | Description |
|---|---|---|
targets! | string[] | YAML configs for execution |
Example
ALT Atomic Core:
- name: Cleanup
type: include
body:
targets:
- cleanup.ymlWorking with the kernel (kernel)
The kernel module is designed to select the kernel version (flavour), connect additional modules, include headers, and rebuild initramfs.
| Field | Type | Description |
|---|---|---|
kernel-info | object | Working with the kernel and kernel modules |
initrd | object | Working with initrd |
The kernel-info subsection
| Field | Type | Description |
|---|---|---|
flavour | string | Kernel version |
modules | string[] | Names of the kernel modules (kernel-module-<name>-<flavour>) |
include-headers | boolean | Whether to include core headers |
no-inherit-modules | boolean | Do not inherit modules from the installed kernel when installing the selected kernel. |
The initrd subsection
| Field | Type | Description |
|---|---|---|
method | string | auto, dracut, make-initrd, none, or an empty string. Empty selects auto when configuring the kernel; none disables rebuilding. |
plymouth-theme | string | Theme plymouth-theme-<name>; disabled disables Plymouth. If method is omitted, auto is used. |
Example
ALT Atomic Core:
- name: Update kernel
type: kernel
body:
kernel-info:
flavour: ${{ Env.KERNEL_FLAVOUR }}
modules:
- drm
initrd:
method: dracutCreating links (link)
The link module is designed to create symbolic links to objects.
Legend
! — required field
| Field | Type | Description |
|---|---|---|
target! | string | Where to create the link, absolute path |
to! | string | Where it will lead |
replace | boolean | Whether to replace target |
Example
ALT Atomic Core
- type: link
body:
target: /ostree
to: /sysroot/ostree
replace: trueMerging file contents (merge)
The merge module is designed to merge files.
Legend
! — required field
| Field | Type | Description |
|---|---|---|
source! | string | Path to the file whose contents need to be taken |
destination! | string | Path to the file where the contents need to be added |
create-file-perm | string | Permissions for creating a file in the rwxrwxrwx format if it doesn’t exist |
prepend | boolean | Should the content be added to the beginning of the file? |
Creating directories (mkdir)
The mkdir module is designed to create directories at the specified paths with defined ownership rights.
Legend
! — required field
| Field | Type | Description |
|---|---|---|
targets! | string[] | Paths where directories need to be created |
perm! | string | Permissions for directories in the format rwxrwxrwx |
Example
ALT Atomic Core:
- type: mkdir
body:
targets:
- /sysroot
perm: rwxr-xr-xMoving objects (move)
The move module is designed to move objects in the file system, with the option to leave a reference in place of the moved object.
Legend
! — required field
| Field | Type | Description |
|---|---|---|
source! | string | What |
destination! | string | Where |
replace | boolean | Replace the object at destination |
create-link | boolean | Create a link from the target’s parent directory to the destination |
Example
ALT Atomic Core:
- type: move
body:
source: /etc/apt
destination: /usr/share/apt
create-link: trueNetwork configuration (network)
The network module is designed to configure network settings.
Legend
! — required field
| Field | Type | Description |
|---|---|---|
hostname! | string | Device network name |
Example
ALT Atomic Core:
- type: network
body:
hostname: alt-atomic-${{ Env.IMAGE_NAME }}Working with packages (packages)
The packages module is designed to work with packages: installation, removal, updating the database and the packages themselves.
| Field | Type | Description |
|---|---|---|
install | string[] | Packages to be installed |
remove | string[] | Packages to be removed |
update | boolean | Whether to update the database before the transaction |
upgrade | boolean | Whether to update the packages before the transaction |
depends | boolean | Remove packages with dependencies |
options | map<string, string> | APT overrides for module operations, for example Dir::Cache::Archives: /tmp/apt-cache. Values are strings. |
Example
ALT Atomic Core:
- type: packages
body:
install:
- glxinfo
- mesa-dri-drivers
update: true
upgrade: trueRemoving objects (remove)
The remove module is designed to delete objects.
Legend
! — required field
| Field | Type | Description |
|---|---|---|
targets! | string[] | Path to the objects that need to be deleted |
inside | boolean | Clear objects instead of deleting |
Example
ALT Atomic Core:
- name: Clean logs
type: remove
body:
targets:
- /var/log/README.logs
- /var/log/rpmpkgs
inside: trueChanging the file content (replace)
The replace module is designed to replace the contents of a file based on a regular expression.
Legend
! — required field
| Field | Type | Description |
|---|---|---|
target! | string | Path to the file |
pattern! | string | Regular expression pattern |
repl! | string | Replacement |
Working with repositories (repos)
The repos module is designed to clean, install custom or pre-installed repositories, and add tasks (projects).
Legend
! — required field
| Field | Type | Description |
|---|---|---|
clean | boolean | Clear all repositories. Conflicts with clean-temporary |
custom | string[] | Custom entries in sources.list |
branch | string | ALT repository branch. Comments out the remaining repositories; to clean up, use clean |
date | string | Date "YYYYMMDD", "YYYY/MM/DD", or latest. An empty value selects the regular repository. Requires branch. |
tasks | string[] | Tasks to be included as repositories |
no-update | boolean | Do not update the database after saving the repositories |
clean-temporary | boolean | Clear temporary repositories. Conflicts with clean |
Use apm repo branches to list available branches (for example, sisyphus and p11).
Example
ALT Atomic Core:
- name: Set repos
type: repos
body:
branch: sisyphus
date: ${{ Env.YEAR }}/${{ Env.MONTH }}/${{ Env.DAY }}
clean: trueExecuting scripts (shell)
The shell module is designed to execute imperative code in Bash.
Legend
! — required field
| Field | Type | Description |
|---|---|---|
command! | string | Commands to execute |
quiet | boolean | Hides command output |
Example
ALT Atomic Core:
- name: Set root password
type: shell
body:
command: echo "root:root" | chpasswdWorking with SystemD services (systemd)
The systemd module is designed to monitor the status of SystemD.
Legend
! — required field
| Field | Type | Description |
|---|---|---|
targets! | string[] | Service names |
enabled | boolean | Whether to enable the service or not. Conflicts with masked |
global | boolean | Whether to enable the service globally, for all users |
masked | boolean | Whether to mask the service. Conflicts with enabled |
Example
ALT Atomic Core:
- type: systemd
body:
targets:
- ostree-remount
- NetworkManager
- libvirtd
- chrony
- podman.socket
- sync-users.service
- sync-directory.service
- tmp.mount
enabled: true