1buildah(1)                  General Commands Manual                 buildah(1)
2
3
4

NAME

6       Buildah  -  A command line tool that facilitates building OCI container
7       images.
8
9

SYNOPSIS

11       buildah [OPTIONS] COMMAND [ARG...]
12
13

DESCRIPTION

15       The Buildah package provides a command line tool which can be used to:
16
17
18              * Create a working container, either from scratch or using an image as a starting point.
19              * Mount a working container's root filesystem for manipulation.
20              * Unmount a working container's root filesystem.
21              * Use the updated contents of a container's root filesystem as a filesystem layer to create a new image.
22              * Delete a working container or an image.
23              * Rename a local container.
24
25
26
27       This tool needs to be run as the root user.
28
29

OPTIONS

31       --debug
32
33
34       Print debugging information
35
36
37       --help, -h
38
39
40       Show help
41
42
43       --registries-conf path
44
45
46       Pathname of the configuration file which specifies which container reg‐
47       istries  should  be  consulted when completing image names which do not
48       include a registry or domain portion.  It is not recommended that  this
49       option  be  used, as the default behavior of using the system-wide con‐
50       figuration (/etc/containers/registries.conf) is most often preferred.
51
52
53       --registries-conf-dir path
54
55
56       Pathname of the directory which contains configuration  snippets  which
57       specify  registries  which  should  be  consulted when completing image
58       names which do not include a registry or domain  portion.   It  is  not
59       recommended  that this option be used, as the default behavior of using
60       the system-wide configuration  (/etc/containers/registries.d)  is  most
61       often preferred.
62
63
64       --root value
65
66
67       Storage  root  dir  (default:  "/var/lib/containers/storage" for UID 0,
68       "$HOME/.local/share/containers/storage" for other users)  Default  root
69       dir is configured in /etc/containers/storage.conf
70
71
72       --runroot value
73
74
75       Storage  state  dir  (default: "/var/run/containers/storage" for UID 0,
76       "/var/run/user/$UID" for other users) Default state dir  is  configured
77       in /etc/containers/storage.conf
78
79
80       --storage-driver value
81
82
83       Storage  driver.  The default storage driver for UID 0 is configured in
84       /etc/containers/storage.conf ($HOME/.config/containers/storage.conf  in
85       rootless  mode),  and is vfs for other users.  The STORAGE_DRIVER envi‐
86       ronment variable overrides the default.  The --storage-driver specified
87       driver overrides all.
88
89
90       Examples: "overlay", "devicemapper", "vfs"
91
92
93       Overriding this option will cause the storage-opt settings in /etc/con‐
94       tainers/storage.conf to be ignored.  The user must  specify  additional
95       options via the --storage-opt flag.
96
97
98       --storage-opt value
99
100
101       Storage driver option, Default storage driver options are configured in
102       /etc/containers/storage.conf ($HOME/.config/containers/storage.conf  in
103       rootless  mode).  The  STORAGE_OPTS  environment variable overrides the
104       default. The --storage-opt specified options overrides all.
105
106
107       --userns-uid-map mapping
108
109
110       Specifies UID mappings which should be used to set  ownership,  at  the
111       filesytem  level, on the contents of images and containers.  Entries in
112       this map take the form of one or more triples  of  a  starting  in-con‐
113       tainer  UID, a corresponding starting host-level UID, and the number of
114       consecutive IDs which the map entry represents.  This option  overrides
115       the  remap-uids setting in the options section of /etc/containers/stor‐
116       age.conf.
117
118
119       --userns-gid-map mapping
120
121
122       Specifies GID mappings which should be used to set  ownership,  at  the
123       filesytem  level, on the contents of images and containers.  Entries in
124       this map take the form of one or more triples  of  a  starting  in-con‐
125       tainer  GID, a corresponding starting host-level GID, and the number of
126       consecutive IDs which the map entry represents.  This option  overrides
127       the  remap-gids setting in the options section of /etc/containers/stor‐
128       age.conf.
129
130
131       --version, -v
132
133
134       Print the version
135
136

COMMANDS

138       ┌──────────────────────┬────────────────────────────────┐
139Command               Description                    
140       ├──────────────────────┼────────────────────────────────┤
141buildah-add(1)        │ Add the contents  of  a  file, │
142       │                      │ URL,  or  a  directory  to the │
143       │                      │ container.                     │
144       ├──────────────────────┼────────────────────────────────┤
145buildah-bud(1)        │ Build an image using  instruc‐ │
146       │                      │ tions from Dockerfiles.        │
147       ├──────────────────────┼────────────────────────────────┤
148buildah-commit(1)     │ Create an image from a working │
149       │                      │ container.                     │
150       ├──────────────────────┼────────────────────────────────┤
151buildah-config(1)     │ Update   image   configuration │
152       │                      │ settings.                      │
153       ├──────────────────────┼────────────────────────────────┤
154buildah-containers(1) │ List  the  working  containers │
155       │                      │ and their base images.         │
156       ├──────────────────────┼────────────────────────────────┤
157buildah-copy(1)       │ Copies the contents of a file, │
158       │                      │ URL,  or directory into a con‐ │
159       │                      │ tainer's working directory.    │
160       ├──────────────────────┼────────────────────────────────┤
161buildah-from(1)       │ Creates  a  new  working  con‐ │
162       │                      │ tainer, either from scratch or │
163       │                      │ using a specified image  as  a │
164       │                      │ starting point.                │
165       ├──────────────────────┼────────────────────────────────┤
166buildah-images(1)     │ List images in local storage.  │
167       ├──────────────────────┼────────────────────────────────┤
168buildah-info(1)       │ Display  Buildah system infor‐ │
169       │                      │ mation.                        │
170       ├──────────────────────┼────────────────────────────────┤
171buildah-inspect(1)    │ Inspects the configuration  of │
172       │                      │ a container or image           │
173       ├──────────────────────┼────────────────────────────────┤
174buildah-mount(1)      │ Mount  the working container's │
175       │                      │ root filesystem.               │
176       ├──────────────────────┼────────────────────────────────┤
177buildah-login(1)      │ Login to a container registry. │
178       ├──────────────────────┼────────────────────────────────┤
179buildah-logout(1)     │ Logout of a container registry │
180       ├──────────────────────┼────────────────────────────────┤
181buildah-pull(1)       │ Pull an image from the  speci‐ │
182       │                      │ fied location.                 │
183       ├──────────────────────┼────────────────────────────────┤
184buildah-push(1)       │ Push an image from local stor‐ │
185       │                      │ age to elsewhere.              │
186       ├──────────────────────┼────────────────────────────────┤
187buildah-rename(1)     │ Rename a local container.      │
188       ├──────────────────────┼────────────────────────────────┤
189buildah-rm(1)         │ Removes one  or  more  working │
190       │                      │ containers.                    │
191       ├──────────────────────┼────────────────────────────────┤
192buildah-rmi(1)        │ Removes one or more images.    │
193       ├──────────────────────┼────────────────────────────────┤
194buildah-run(1)        │ Run  a  command  inside of the │
195       │                      │ container.                     │
196       ├──────────────────────┼────────────────────────────────┤
197buildah-tag(1)        │ Add an additional  name  to  a │
198       │                      │ local image.                   │
199       ├──────────────────────┼────────────────────────────────┤
200buildah-umount(1)     │ Unmount  a working container's │
201       │                      │ root file system.              │
202       ├──────────────────────┼────────────────────────────────┤
203buildah-unshare(1)    │ Launch a  command  in  a  user │
204       │                      │ namespace   with  modified  ID │
205       │                      │ mappings.                      │
206       ├──────────────────────┼────────────────────────────────┤
207buildah-version(1)    │ Display  the  Buildah  Version │
208       │                      │ Information                    │
209       ├──────────────────────┼────────────────────────────────┤
210storage.conf(5)       │ Syntax  of  Container  Storage │
211       │                      │ configuration file             │
212       └──────────────────────┴────────────────────────────────┘
213

Files

215       storage.conf (/etc/containers/storage.conf)
216
217
218              storage.conf is the storage configuration file for all tools using containers/storage
219
220              The storage configuration file specifies all of the available container storage options for tools using shared container storage.
221
222
223
224       mounts.conf (/usr/share/containers/mounts.conf and optionally /etc/con‐
225       tainers/mounts.conf)
226
227
228              The mounts.conf files specify volume mount directories that are automatically mounted inside containers when executing the `buildah run` or `buildah build-using-dockerfile` commands.  Container process can then use this content.  The volume mount content does not get committed to the final image.
229
230              Usually these directories are used for passing secrets or credentials required by the package software to access remote package repositories.
231
232              For example, a mounts.conf with the line "`/usr/share/rhel/secrets:/run/secrets`", the content of `/usr/share/rhel/secrets` directory is mounted on `/run/secrets` inside the container.  This mountpoint allows Red Hat Enterprise Linux subscriptions from the host to be used within the container.
233
234              Note this is not a volume mount. The content of the volumes is copied into container storage, not bind mounted directly from the host.
235
236
237
238       registries.conf (/etc/containers/registries.conf)
239
240
241              registries.conf is the configuration file which specifies which container registries should be consulted when completing image names which do not include a registry or domain portion.
242
243
244
245       registries.d (/etc/containers/registries.d)
246
247
248       Directory  which  contains  configuration  snippets  which specify reg‐
249       istries which should be consulted when completing image names which  do
250       not include a registry or domain portion.
251
252

SEE ALSO

254       podman(1),  containers-mounts.conf(5), newuidmap(1), newgidmap(1), con‐
255       tainers-registries.conf(5), containers-storage.conf(5)
256
257

HISTORY

259       December 2017, Originally compiled by Tom Sweeney ⟨tsweeney@redhat.com⟩
260
261
262
263buildah                           March 2017                        buildah(1)
Impressum