Debian Codegraph @

share/man/container-build.1.rst

raw
1 .. Open Infrastructure: compute-tools
2
3 .. Copyright (C) 2014-2026 Daniel Baumann <[email protected]>
4 ..
5 .. SPDX-License-Identifier: GPL-3.0+
6 ..
7 .. This program is free software: you can redistribute it and/or modify
8 .. it under the terms of the GNU General Public License as published by
9 .. the Free Software Foundation, either version 3 of the License, or
10 .. (at your option) any later version.
11 ..
12 .. This program is distributed in the hope that it will be useful,
13 .. but WITHOUT ANY WARRANTY; without even the implied warranty of
14 .. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 .. GNU General Public License for more details.
16 ..
17 .. You should have received a copy of the GNU General Public License
18 .. along with this program. If not, see <https://www.gnu.org/licenses/>.
19
20 ===============
21 container-build
22 ===============
23
24 -----------------
25 Build a container
26 -----------------
27
28 :manual section: 1
29 :manual group: Open Infrastructure
30
31 Synopsis
32 ========
33
34 | **container build** ['OPTIONS']
35 | **cnt b** ['OPTIONS']
36
37 Description
38 ===========
39
40 The **container build** command builds a container based on a script.
41
42 Scripts
43 -------
44
45 The following build scripts are available:
46
47 debootstrap:
48 Basic script to build Debian based container, see
49 container-build-debootstrap(1).
50
51 debconf:
52 Advanced script to automatically build Debian based container, see
53 container-build-debconf(1).
54
55 default:
56 Symlink (if existing) to a build script which is used if no script was
57 specified. On Debian based system this can be managed through
58 update-alternatives(1), i.e. 'sudo update-alternatives --config
59 container_build-script'.
60
61 Options
62 =======
63
64 The following **container build** options are available:
65
66 -n, --name='NAME':
67 Specify container name.
68
69 -c, --capability='CAPABILITY':
70 Specify capabilities to grant, see capabilities(7).
71
72 -d, --drop-capability='DROP_CAPABILITY':
73 Specify capabilities to drop, see capabilities(7).
74
75 -s, --script='SCRIPT':
76 Specify container build script, defaults to 'debootstrap'.
77
78 -v, --verbose:
79 Explain what is being done.
80
81 -b, --bind='DIRECTORY:DIRECTORY[:OPTIONS][;DIRECTORY:DIRECTORY[:OPTIONS]]':
82 Specify container read-write bind mounts, see systemd-nspawn(1) --bind option.
83
84 --bind-ro='DIRECTORY:DIRECTORY[:OPTIONS][;DIRECTORY:DIRECTORY[:OPTIONS]]':
85 Specify container read-only bind mounts, see systemd-nspawn(1) --bind-ro
86 option.
87
88 --cnt-overlay='DIRECTORY_LOWER:DIRECTORY_UPPER:DIRECTORY_WORK:DIRECTORY_MERGED[;DIRECTORY_UPPER:DIRECTORY_LOWER:DIRECTORY_WORK:DIRECTORY_MERGED]':
89 Specify container overlay mounts, see Documentation/filesystems/overlayfs.txt.
90
91 --cnt.overlay-options='OPTION1,OPTION2[;OPTION3,OPTION4]':
92 Specify container overlay mount options, see
93 Documentation/filesystems/overlayfs.txt.
94
95 --cnt.start='OPTION1[,OPTION2,...]':
96 Specify container start options, see container-start(1).
97
98 Examples
99 ========
100
101 Build example.net container using debootstrap script:
102
103 sudo container build -n example.net -s debootstrap
104
105 Build example.net container using debconf script:
106
107 sudo container build -n example.net -s debconf
108
109 Build example.net container with the default build script and start it:
110
111 sudo container build,start -n example.net
112
113 See also
114 ========
115
116 | compute-tools(7),
117 | container(1).
118
119 Homepage
120 ========
121
122 More information about compute-tools and the Open Infrastructure project can be
123 found on the homepage (https://open-infrastructure.net).
124
125 Contact
126 =======
127
128 Bug reports, feature requests, help, patches, support and everything else are
129 welcome on the Open Infrastructure Software Mailing List
130 <[email protected]>.
131
132 Debian specific bugs can also be reported in the Debian Bug Tracking System
133 (https://bugs.debian.org).
134
135 Authors
136 =======
137
138 compute-tools were written by Daniel Baumann
139 <[email protected]> and others.