kiwi-ng system build
Builds an image in one call by running the prepare and the create step,
see The Build Process. The root tree is
created in <target-dir>/build/image-root, the log is written to
<target-dir>/build/image-root.log unless --logfile is given,
and the image files are stored in the target directory.
Usage
kiwi-ng [global options] system build \
--description <directory> \
--target-dir <directory> \
[options]
Options
Options marked with ... can be given multiple times.
Option |
Description |
|---|---|
|
Required. The image description directory. |
|
Required. The directory for the build results. |
|
Use the root tree of an earlier build instead of stopping with an error. The root tree can become inconsistent. |
|
Delete the cache of the used repositories before installing packages. The cache is shared between builds, use this if signatures must be validated against the repositories. |
Repositories
Option |
Description |
|---|---|
|
Replace the first repository of the image description, see Repository Format. |
|
The credentials of |
|
Add a repository. |
|
The credentials of |
|
Ignore all repositories of the image description. Combine it with
|
|
Like |
Packages
Option |
Description |
|---|---|
|
Install the package in addition to the image description. |
|
Install the package in the bootstrap phase. |
|
Uninstall the package, including the packages depending on it, right after the packages are installed. |
Image Settings
Option |
Description |
|---|---|
|
Set an attribute of the selected image type, for example
|
|
Set the |
|
Replace the base container of the selected type, if the type has
a |
|
Replace the container tag, if the image description sets one. |
|
Add a container label, overwriting a label of the same name. |
Keys and Certificates
Option |
Description |
|---|---|
|
Import the key as trusted key into the package manager database before any package operation. |
|
Import the CA certificate into the root tree right after the bootstrap phase, for example for proxy servers used by the build. |
|
How the certificates of |
Repository Format
A <repo> value is a comma-separated list of fields. Fields at the end
can be omitted, fields in between left empty:
source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype
Field |
Value |
|---|---|
source |
The location of the repository, see URI Types. |
type |
|
alias |
The name of the repository. Default: a generated unique name. |
priority |
The priority, its meaning depends on the package manager. |
imageinclude |
|
package_gpgcheck |
|
{signing_keys} |
Signing key URIs in curly brackets, separated by semicolons, for
example |
components |
Debian repositories: the components, separated by spaces. |
distribution |
Debian repositories: the distribution name. |
repo_gpgcheck |
|
repo_sourcetype |
|
A <credentials> value is user:password, or the name of a file whose
first line contains it. It is added to the repository source as
scheme://user:password@location.
URI Types
Source |
Location |
|---|---|
|
A repository on a server. |
|
A repository of the Open Build Service, resolved with the download server of the runtime configuration. Default: http://download.opensuse.org/repositories. |
|
Builds in the Open Build Service only: the repositories of the project building the image. |
|
A local directory or file. An absolute path is used as |
Example
$ sudo kiwi-ng system build \
--description kiwi/build-tests/x86/leap/test-image-disk \
--set-repo https://download.opensuse.org/distribution/leap/16.0/repo/oss \
--target-dir /tmp/myimage