Debian Codegraph @

doc/source/commands/system_stackbuild.rst

raw
1 .. _kiwi_system_stackbuild:
2
3 kiwi-ng system stackbuild
4 =========================
5
6 .. _db_kiwi_system_stackbuild_synopsis:
7
8 SYNOPSIS
9 --------
10
11 .. code:: bash
12
13 kiwi-ng [global options] service <command> [<args>]
14
15 kiwi-ng system stackbuild --help
16 kiwi-ng system stackbuild --stash=<name>... --description=<directory> --target-dir=<directory>
17 [--from-registry=<URI>]
18 [kiwi <kiwi_build_command_args>...]
19 kiwi-ng system stackbuild --stash=<name>... --target-dir=<directory>
20 [--from-registry=<URI>]
21 [kiwi <kiwi_create_command_args>...]
22
23 .. _db_kiwi_system_stackbuild_desc:
24
25 DESCRIPTION
26 -----------
27
28 Build an image based on one or more stash containers. A stash
29 is a {kiwi} built root tree stored as an OCI container, see
30 :ref:`kiwi_system_stash`. Using OCI images as the portable format
31 to store and distribute a root tree allows them to be pushed to
32 and pulled from OCI registries.
33
34 The `stackbuild` command operates in two modes:
35
36 1. Rebuild an image from a stash
37
38 In this mode, `stackbuild` takes a stash, makes it available to the
39 local registry, and builds the image using the stash rootfs and
40 the image description stored in the stash. The given
41 `kiwi` subcommand arguments are passed along to the
42 `kiwi-ng system create` command.
43
44 .. code:: bash
45
46 $ kiwi-ng system stackbuild --stash NAME \
47 --target-dir /target/rebuild
48
49 2. Build an image based on a stash
50
51 In this mode, `stackbuild` takes a stash, makes it available to the
52 local registry, and uses the stash rootfs as the base for an image
53 build of another image description. The given `kiwi` subcommand
54 arguments are passed along to the `kiwi-ng system build` command.
55
56 .. code:: bash
57
58 $ kiwi-ng system stackbuild --stash NAME \
59 --description /some/image-description \
60 --target-dir /target/rebuild
61
62 .. note::
63
64 The `stackbuild` command does not perform any consistency check
65 to determine if the used stash rootfs is compatible with the
66 provided image description. With that in mind, nothing prevents
67 you from using a Leap stash and trying to build a Fedora
68 image on top of it. It is the user's responsibility to
69 combine only compatible stashes and image descriptions.
70
71 For a detailed introduction, see :ref:`stackbuild`.
72
73 .. _db_kiwi_system_stackbuild_opts:
74
75 OPTIONS
76 -------
77
78 --stash=<name>
79
80 Name of the stash. See `kiwi-ng system stash --list` for available
81 stashes. Multiple stashes will be stacked together in the given
82 order.
83
84 --from-registry=<URI>
85
86 Pull the given stash container name from the provided
87 registry URI.
88
89 --description=<directory>
90
91 Path to the XML description. This is a directory containing at least
92 one `config.xml` or `*.kiwi` XML file.
93
94 --target-dir=<directory>
95
96 Path to store the build results.
97
98 kiwi <kiwi_build_command_args>...
99
100 List of command parameters as supported by the `kiwi-ng
101 system build` command. The information given here is passed
102 along to the `kiwi-ng system build` command if the
103 `--description` option is set.
104
105 kiwi <kiwi_create_command_args>...
106
107 List of command parameters as supported by the `kiwi-ng
108 system create` command. The information given here is passed
109 along to the `kiwi-ng system create` command if the
110 `--description` option is not set.
111
112 .. note::
113
114 For compatibility with the former `kiwi-stackbuild-plugin`, the
115 `--` separator is accepted as an alias for the `kiwi` subcommand.
116
117 .. _db_kiwi_system_stackbuild_example:
118
119 EXAMPLE
120 -------
121
122 .. code:: bash
123
124 $ kiwi-ng system stackbuild --stash NAME --target-dir /target/rebuild \
125 kiwi --signing-key /path/to/key