• Stars2k+8 tuần này
  • Forks457
  • Watchers43
  • Issues78
  • Ngày tạo13/07/2016
  • Cập nhật gần nhất09/10/2026
  • Ngôn ngữPython
  • Giấy phép—
README.md14.6 KBRaw

mkosi — Build Bespoke OS Images

A fancy wrapper around dnf --installroot, apt, pacman and zypper that generates customized disk images with a number of bells and whistles.

For a longer description and available features and options, see the man page or run mkosi documentation. When getting started see the EXAMPLES section.

Packaging status

Installation

You can install mkosi from your distribution using its package manager or install the development version from git. If you install mkosi using your distribution's package manager, make sure it installs at least mkosi v16 or newer (Use mkosi --version to check). If your distribution only packages an older version of mkosi, it is recommended to install mkosi using one of the alternative installation methods listed below instead.

Running mkosi from the repository

To run mkosi straight from its git repository, you can invoke the shim bin/mkosi. The MKOSI_INTERPRETER environment variable can be set when using the bin/mkosi shim to configure the python interpreter used to execute mkosi. The shim can be symlinked to e.g. ~/.local/bin to make it accessible from the PATH. Note that to make this work you might have to add ~/.local/bin to your user's PATH.

git clone https://github.com/systemd/mkosi
ln -s $PWD/mkosi/bin/mkosi ~/.local/bin/mkosi
mkosi --version

mkosi also provides other companion tools that can be enabled in a similar manner.

ln -s $PWD/mkosi/bin/mkosi-addon ~/.local/bin/mkosi-addon
ln -s $PWD/mkosi/bin/mkosi-initrd ~/.local/bin/mkosi-initrd
ln -s $PWD/mkosi/bin/mkosi-sandbox ~/.local/bin/mkosi-sandbox

Python installation methods

mkosi can also be installed straight from the git repository url using pipx:

pipx install git+https://github.com/systemd/mkosi.git
mkosi --version

which will transparently install mkosi into a Python virtual environment and a mkosi binary to ~/.local/bin. This is, up to the path of the virtual environment and the mkosi binary, equivalent to

python3 -m venv mkosivenv
mkosivenv/bin/pip install git+https://github.com/systemd/mkosi.git
mkosivenv/bin/mkosi --version

Nội dung README thuộc về systemd và cộng đồng đóng góp, giấy phép Không có giấy phép. Nguồn: github.com/systemd/mkosi