1buildah-from(1) General Commands Manual buildah-from(1)
2
3
4
6 buildah-from - Creates a new working container, either from scratch or
7 using a specified image as a starting point.
8
9
11 buildah from [options] image
12
13
15 Creates a working container based upon the specified image name. If
16 the supplied image name is "scratch" a new empty container is created.
17 Image names use a "transport":"details" format.
18
19
20 Multiple transports are supported:
21
22
23 dir:path
24 An existing local directory path containing the manifest, layer tar‐
25 balls, and signatures in individual files. This is a non-standardized
26 format, primarily useful for debugging or noninvasive image inspection.
27
28
29 docker://docker-reference (Default)
30 An image in a registry implementing the "Docker Registry HTTP API
31 V2". By default, uses the authorization state in $XDG\_RUN‐
32 TIME\_DIR/containers/auth.json, which is set using (buildah login). If
33 XDG_RUNTIME_DIR is not set, the default is /run/contain‐
34 ers/$UID/auth.json. If the authorization state is not found there,
35 $HOME/.docker/config.json is checked, which is set using (docker lo‐
36 gin).
37 If docker-reference does not include a registry name, localhost will
38 be consulted first, followed by any registries named in the registries
39 configuration.
40
41
42 docker-archive:path
43 An image is retrieved as a docker load formatted file.
44
45
46 docker-daemon:docker-reference
47 An image docker-reference stored in the docker daemon's internal
48 storage. docker-reference must include either a tag or a digest. Al‐
49 ternatively, when reading images, the format can also be docker-dae‐
50 mon:algo:digest (an image ID).
51
52
53 oci:path:tag**
54 An image tag in a directory compliant with "Open Container Image Lay‐
55 out Specification" at path.
56
57
58 oci-archive:path:tag
59 An image tag in a directory compliant with "Open Container Image Lay‐
60 out Specification" at path.
61
62
63 DEPENDENCIES
64 Buildah resolves the path to the registry to pull from by using the
65 /etc/containers/registries.conf file, containers-registries.conf(5).
66 If the buildah from command fails with an "image not known" error,
67 first verify that the registries.conf file is installed and configured
68 appropriately.
69
70
72 The container ID of the container that was created. On error 1 is re‐
73 turned.
74
75
77 --add-host=[]
78
79
80 Add a custom host-to-IP mapping (host:ip)
81
82
83 Add a line to /etc/hosts. The format is hostname:ip. The --add-host op‐
84 tion can be set multiple times.
85
86
87 --arch="ARCH"
88
89
90 Set the ARCH of the image to be pulled to the provided value instead of
91 using the architecture of the host. (Examples: aarch64, arm, i686,
92 ppc64le, s390x, x86_64)
93
94
95 --authfile path
96
97
98 Path of the authentication file. Default is ${XDG_\RUNTIME_DIR}/con‐
99 tainers/auth.json. If XDG_RUNTIME_DIR is not set, the default is
100 /run/containers/$UID/auth.json. This file is created using using buil‐
101 dah login.
102
103
104 If the authorization state is not found there, $HOME/.docker/con‐
105 fig.json is checked, which is set using docker login.
106
107
108 Note: You can also override the default path of the authentication file
109 by setting the REGISTRY_AUTH_FILE environment variable. export REG‐
110 ISTRY_AUTH_FILE=path
111
112
113 --cap-add=CAP_xxx
114
115
116 Add the specified capability to the default set of capabilities which
117 will be supplied for subsequent buildah run invocations which use this
118 container. Certain capabilities are granted by default; this option
119 can be used to add more.
120
121
122 --cap-drop=CAP_xxx
123
124
125 Remove the specified capability from the default set of capabilities
126 which will be supplied for subsequent buildah run invocations which use
127 this container. The CAP_AUDIT_WRITE, CAP_CHOWN, CAP_DAC_OVERRIDE,
128 CAP_FOWNER, CAP_FSETID, CAP_KILL, CAP_MKNOD, CAP_NET_BIND_SERVICE,
129 CAP_SETFCAP, CAP_SETGID, CAP_SETPCAP, CAP_SETUID, and CAP_SYS_CHROOT
130 capabilities are granted by default; this option can be used to remove
131 them.
132
133
134 If a capability is specified to both the --cap-add and --cap-drop op‐
135 tions, it will be dropped, regardless of the order in which the options
136 were given.
137
138
139 --cert-dir path
140
141
142 Use certificates at path (*.crt, *.cert, *.key) to connect to the reg‐
143 istry. The default certificates directory is /etc/containers/certs.d.
144
145
146 --cgroup-parent=""
147
148
149 Path to cgroups under which the cgroup for the container will be cre‐
150 ated. If the path is not absolute, the path is considered to be rela‐
151 tive to the cgroups path of the init process. Cgroups will be created
152 if they do not already exist.
153
154
155 --cidfile ContainerIDFile
156
157
158 Write the container ID to the file.
159
160
161 --cni-config-dir=directory
162
163
164 Location of CNI configuration files which will dictate which plugins
165 will be used to configure network interfaces and routing when the con‐
166 tainer is subsequently used for buildah run, if processes to be started
167 will be run in their own network namespaces, and networking is not dis‐
168 abled.
169
170
171 --cni-plugin-path=directory[:directory[:directory[...]]]
172
173
174 List of directories in which the CNI plugins which will be used for
175 configuring network namespaces can be found.
176
177
178 --cpu-period=0
179
180
181 Limit the CPU CFS (Completely Fair Scheduler) period
182
183
184 Limit the container's CPU usage. This flag tell the kernel to restrict
185 the container's CPU usage to the period you specify.
186
187
188 --cpu-quota=0
189
190
191 Limit the CPU CFS (Completely Fair Scheduler) quota
192
193
194 Limit the container's CPU usage. By default, containers run with the
195 full CPU resource. This flag tell the kernel to restrict the con‐
196 tainer's CPU usage to the quota you specify.
197
198
199 --cpu-shares, -c=0
200
201
202 CPU shares (relative weight)
203
204
205 By default, all containers get the same proportion of CPU cycles. This
206 proportion can be modified by changing the container's CPU share
207 weighting relative to the weighting of all other running containers.
208
209
210 To modify the proportion from the default of 1024, use the --cpu-shares
211 flag to set the weighting to 2 or higher.
212
213
214 The proportion will only apply when CPU-intensive processes are run‐
215 ning. When tasks in one container are idle, other containers can use
216 the left-over CPU time. The actual amount of CPU time will vary depend‐
217 ing on the number of containers running on the system.
218
219
220 For example, consider three containers, one has a cpu-share of 1024 and
221 two others have a cpu-share setting of 512. When processes in all three
222 containers attempt to use 100% of CPU, the first container would re‐
223 ceive 50% of the total CPU time. If you add a fourth container with a
224 cpu-share of 1024, the first container only gets 33% of the CPU. The
225 remaining containers receive 16.5%, 16.5% and 33% of the CPU.
226
227
228 On a multi-core system, the shares of CPU time are distributed over all
229 CPU cores. Even if a container is limited to less than 100% of CPU
230 time, it can use 100% of each individual CPU core.
231
232
233 For example, consider a system with more than three cores. If you start
234 one container {C0} with -c=512 running one process, and another con‐
235 tainer {C1} with -c=1024 running two processes, this can result in the
236 following division of CPU shares:
237
238
239 PID container CPU CPU share
240 100 {C0} 0 100% of CPU0
241 101 {C1} 1 100% of CPU1
242 102 {C1} 2 100% of CPU2
243
244
245
246 --cpuset-cpus=""
247
248
249 CPUs in which to allow execution (0-3, 0,1)
250
251
252 --cpuset-mems=""
253
254
255 Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effec‐
256 tive on NUMA systems.
257
258
259 If you have four memory nodes on your system (0-3), use
260 --cpuset-mems=0,1 then processes in your container will only use memory
261 from the first two memory nodes.
262
263
264 --creds creds
265
266
267 The [username[:password]] to use to authenticate with the registry if
268 required. If one or both values are not supplied, a command line
269 prompt will appear and the value can be entered. The password is en‐
270 tered without echo.
271
272
273 --decryption-key key[:passphrase]
274
275
276 The [key[:passphrase]] to be used for decryption of images. Key can
277 point to keys and/or certificates. Decryption will be tried with all
278 keys. If the key is protected by a passphrase, it is required to be
279 passed in the argument and omitted otherwise.
280
281
282 --device=device
283
284
285 Add a host device or devices under a directory to the container. The
286 format is <device-on-host>[:<device-on-container>][:<permissions>]
287 (e.g. --device=/dev/sdc:/dev/xvdc:rwm)
288
289
290 --dns=[]
291
292
293 Set custom DNS servers
294
295
296 This option can be used to override the DNS configuration passed to the
297 container. Typically this is necessary when the host DNS configuration
298 is invalid for the container (e.g., 127.0.0.1). When this is the case
299 the --dns flag is necessary for every run.
300
301
302 The special value none can be specified to disable creation of /etc/re‐
303 solv.conf in the container by Buildah. The /etc/resolv.conf file in the
304 image will be used without changes.
305
306
307 --dns-option=[]
308
309
310 Set custom DNS options
311
312
313 --dns-search=[]
314
315
316 Set custom DNS search domains
317
318
319 --format, -f oci | docker
320
321
322 Control the format for the built image's manifest and configuration
323 data. Recognized formats include oci (OCI image-spec v1.0, the de‐
324 fault) and docker (version 2, using schema format 2 for the manifest).
325
326
327 Note: You can also override the default format by setting the BUIL‐
328 DAH_FORMAT environment variable. export BUILDAH_FORMAT=docker
329
330
331 --http-proxy
332
333
334 By default proxy environment variables are passed into the container if
335 set for the Buildah process. This can be disabled by setting the
336 --http-proxy option to false. The environment variables passed in in‐
337 clude http_proxy, https_proxy, ftp_proxy, no_proxy, and also the upper
338 case versions of those.
339
340
341 Defaults to true
342
343
344 --ipc how
345
346
347 Sets the configuration for IPC namespaces when the container is subse‐
348 quently used for buildah run. The configured value can be "" (the
349 empty string) or "container" to indicate that a new IPC namespace
350 should be created, or it can be "host" to indicate that the IPC name‐
351 space in which Buildah itself is being run should be reused, or it can
352 be the path to an IPC namespace which is already in use by another
353 process.
354
355
356 --isolation type
357
358
359 Controls what type of isolation is used for running processes under
360 buildah run. Recognized types include oci (OCI-compatible runtime, the
361 default), rootless (OCI-compatible runtime invoked using a modified
362 configuration, with --no-new-keyring added to its create invocation,
363 with network and UTS namespaces disabled, and IPC, PID, and user name‐
364 spaces enabled; the default for unprivileged users), and chroot (an in‐
365 ternal wrapper that leans more toward chroot(1) than container technol‐
366 ogy).
367
368
369 Note: You can also override the default isolation type by setting the
370 BUILDAH_ISOLATION environment variable. export BUILDAH_ISOLATION=oci
371
372
373 --memory, -m=""
374
375
376 Memory limit (format: [], where unit = b, k, m or g)
377
378
379 Allows you to constrain the memory available to a container. If the
380 host supports swap memory, then the -m memory setting can be larger
381 than physical RAM. If a limit of 0 is specified (not using -m), the
382 container's memory is not limited. The actual limit may be rounded up
383 to a multiple of the operating system's page size (the value would be
384 very large, that's millions of trillions).
385
386
387 --memory-swap="LIMIT"
388
389
390 A limit value equal to memory plus swap. Must be used with the -m
391 (--memory) flag. The swap LIMIT should always be larger than -m (--mem‐
392 ory) value. By default, the swap LIMIT will be set to double the value
393 of --memory.
394
395
396 The format of LIMIT is <number>[<unit>]. Unit can be b (bytes), k
397 (kilobytes), m (megabytes), or g (gigabytes). If you don't specify a
398 unit, b is used. Set LIMIT to -1 to enable unlimited swap.
399
400
401 --name name
402
403
404 A name for the working container
405
406
407 --net how --network how
408
409
410 Sets the configuration for network namespaces when the container is
411 subsequently used for buildah run. The configured value can be "" (the
412 empty string) or "container" to indicate that a new network namespace
413 should be created, or it can be "host" to indicate that the network
414 namespace in which Buildah itself is being run should be reused, or it
415 can be the path to a network namespace which is already in use by an‐
416 other process.
417
418
419 --os="OS"
420
421
422 Set the OS of the image to be pulled to the provided value instead of
423 using the current operating system of the host.
424
425
426 --pid how
427
428
429 Sets the configuration for PID namespaces when the container is subse‐
430 quently used for buildah run. The configured value can be "" (the
431 empty string) or "container" to indicate that a new PID namespace
432 should be created, or it can be "host" to indicate that the PID name‐
433 space in which Buildah itself is being run should be reused, or it can
434 be the path to a PID namespace which is already in use by another
435 process.
436
437
438 --pull
439
440
441 When the flag is enabled, attempt to pull the latest image from the
442 registries listed in registries.conf if a local image does not exist or
443 the image is newer than the one in storage. Raise an error if the image
444 is not in any listed registry and is not present locally.
445
446
447 If the flag is disabled (with --pull=false), do not pull the image from
448 the registry, use only the local version. Raise an error if the image
449 is not present locally.
450
451
452 Defaults to true.
453
454
455 --pull-always
456
457
458 Pull the image from the first registry it is found in as listed in reg‐
459 istries.conf. Raise an error if not found in the registries, even if
460 the image is present locally.
461
462
463 --pull-never
464
465
466 Do not pull the image from the registry, use only the local version.
467 Raise an error if the image is not present locally.
468
469
470 --quiet, -q
471
472
473 If an image needs to be pulled from the registry, suppress progress
474 output.
475
476
477 --security-opt=[]
478
479
480 Security Options
481
482
483 "label=user:USER" : Set the label user for the container
484 "label=role:ROLE" : Set the label role for the container
485 "label=type:TYPE" : Set the label type for the container
486 "label=level:LEVEL" : Set the label level for the container
487 "label=disable" : Turn off label confinement for the container
488 "no-new-privileges" : Not supported
489
490
491 "seccomp=unconfined" : Turn off seccomp confinement for the container
492 "seccomp=profile.json : White listed syscalls seccomp Json file to
493 be used as a seccomp filter
494
495
496 "apparmor=unconfined" : Turn off apparmor confinement for the container
497 "apparmor=your-profile" : Set the apparmor confinement profile for
498 the container
499
500
501 --shm-size=""
502
503
504 Size of /dev/shm. The format is <number><unit>. number must be greater
505 than 0. Unit is optional and can be b (bytes), k (kilobytes),
506 m(megabytes), or g (gigabytes). If you omit the unit, the system uses
507 bytes. If you omit the size entirely, the system uses 64m.
508
509
510 --tls-verify bool-value
511
512
513 Require HTTPS and verification of certificates when talking to con‐
514 tainer registries (defaults to true). TLS verification cannot be used
515 when talking to an insecure registry.
516
517
518 --ulimit type=soft-limit[:hard-limit]
519
520
521 Specifies resource limits to apply to processes launched during buildah
522 run. This option can be specified multiple times. Recognized resource
523 types include:
524 "core": maximum core dump size (ulimit -c)
525 "cpu": maximum CPU time (ulimit -t)
526 "data": maximum size of a process's data segment (ulimit -d)
527 "fsize": maximum size of new files (ulimit -f)
528 "locks": maximum number of file locks (ulimit -x)
529 "memlock": maximum amount of locked memory (ulimit -l)
530 "msgqueue": maximum amount of data in message queues (ulimit -q)
531 "nice": niceness adjustment (nice -n, ulimit -e)
532 "nofile": maximum number of open files (ulimit -n)
533 "nofile": maximum number of open files (1048576); when run by root
534 "nproc": maximum number of processes (ulimit -u)
535 "nproc": maximum number of processes (1048576); when run by root
536 "rss": maximum size of a process's (ulimit -m)
537 "rtprio": maximum real-time scheduling priority (ulimit -r)
538 "rttime": maximum amount of real-time execution between blocking
539 syscalls
540 "sigpending": maximum number of pending signals (ulimit -i)
541 "stack": maximum stack size (ulimit -s)
542
543
544 --userns how
545
546
547 Sets the configuration for user namespaces when the container is subse‐
548 quently used for buildah run. The configured value can be "" (the
549 empty string) or "container" to indicate that a new user namespace
550 should be created, it can be "host" to indicate that the user namespace
551 in which Buildah itself is being run should be reused, or it can be the
552 path to an user namespace which is already in use by another process.
553
554
555 --userns-uid-map-user mapping
556
557
558 Directly specifies a UID mapping which should be used to set ownership,
559 at the filesystem level, on the container's contents. Commands run us‐
560 ing buildah run will default to being run in their own user namespaces,
561 configured using the UID and GID maps.
562
563
564 Entries in this map take the form of one or more triples of a starting
565 in-container UID, a corresponding starting host-level UID, and the num‐
566 ber of consecutive IDs which the map entry represents.
567
568
569 This option overrides the remap-uids setting in the options section of
570 /etc/containers/storage.conf.
571
572
573 If this option is not specified, but a global --userns-uid-map setting
574 is supplied, settings from the global option will be used.
575
576
577 If none of --userns-uid-map-user, --userns-gid-map-group, or
578 --userns-uid-map are specified, but --userns-gid-map is specified, the
579 UID map will be set to use the same numeric values as the GID map.
580
581
582 NOTE: When this option is specified by a rootless user, the specified
583 mappings are relative to the rootless usernamespace in the container,
584 rather than being relative to the host as it would be when run rootful.
585
586
587 --userns-gid-map-group mapping
588
589
590 Directly specifies a GID mapping which should be used to set ownership,
591 at the filesystem level, on the container's contents. Commands run us‐
592 ing buildah run will default to being run in their own user namespaces,
593 configured using the UID and GID maps.
594
595
596 Entries in this map take the form of one or more triples of a starting
597 in-container GID, a corresponding starting host-level GID, and the num‐
598 ber of consecutive IDs which the map entry represents.
599
600
601 This option overrides the remap-gids setting in the options section of
602 /etc/containers/storage.conf.
603
604
605 If this option is not specified, but a global --userns-gid-map setting
606 is supplied, settings from the global option will be used.
607
608
609 If none of --userns-uid-map-user, --userns-gid-map-group, or
610 --userns-gid-map are specified, but --userns-uid-map is specified, the
611 GID map will be set to use the same numeric values as the UID map.
612
613
614 NOTE: When this option is specified by a rootless user, the specified
615 mappings are relative to the rootless usernamespace in the container,
616 rather than being relative to the host as it would be when run rootful.
617
618
619 --userns-uid-map-user user
620
621
622 Specifies that a UID mapping which should be used to set ownership, at
623 the filesystem level, on the container's contents, can be found in en‐
624 tries in the /etc/subuid file which correspond to the specified user.
625 Commands run using buildah run will default to being run in their own
626 user namespaces, configured using the UID and GID maps. If
627 --userns-gid-map-group is specified, but --userns-uid-map-user is not
628 specified, Buildah will assume that the specified group name is also a
629 suitable user name to use as the default setting for this option.
630
631
632 --userns-gid-map-group group
633
634
635 Specifies that a GID mapping which should be used to set ownership, at
636 the filesystem level, on the container's contents, can be found in en‐
637 tries in the /etc/subgid file which correspond to the specified group.
638 Commands run using buildah run will default to being run in their own
639 user namespaces, configured using the UID and GID maps. If
640 --userns-uid-map-user is specified, but --userns-gid-map-group is not
641 specified, Buildah will assume that the specified user name is also a
642 suitable group name to use as the default setting for this option.
643
644
645 --uts how
646
647
648 Sets the configuration for UTS namespaces when the container is subse‐
649 quently used for buildah run. The configured value can be "" (the
650 empty string) or "container" to indicate that a new UTS namespace
651 should be created, or it can be "host" to indicate that the UTS name‐
652 space in which Buildah itself is being run should be reused, or it can
653 be the path to a UTS namespace which is already in use by another
654 process.
655
656
657 --variant=""
658
659
660 Set the architecture variant of the image to be pulled.
661
662
663 --volume, -v[=[HOST-DIR:CONTAINER-DIR[:OPTIONS]]]
664
665
666 Create a bind mount. If you specify, -v /HOST-DIR:/CONTAINER-DIR, Buil‐
667 dah
668 bind mounts /HOST-DIR in the host to /CONTAINER-DIR in the Buildah
669 container. The OPTIONS are a comma delimited list and can be: [1]
670 ⟨#Footnote1⟩
671
672
673 • [rw|ro]
674
675 • [U]
676
677 • [z|Z|O]
678
679 • [[r]shared|[r]slave|[r]private|[r]unbindable]
680
681
682
683 The CONTAINER-DIR must be an absolute path such as /src/docs. The
684 HOST-DIR must be an absolute path as well. Buildah bind-mounts the
685 HOST-DIR to the path you specify. For example, if you supply /foo as
686 the host path, Buildah copies the contents of /foo to the container
687 filesystem on the host and bind mounts that into the container.
688
689
690 You can specify multiple -v options to mount one or more mounts to a
691 container.
692
693
694 Write Protected Volume Mounts
695
696
697 You can add the :ro or :rw suffix to a volume to mount it read-only or
698 read-write mode, respectively. By default, the volumes are mounted
699 read-write. See examples.
700
701
702 Chowning Volume Mounts
703
704
705 By default, Buildah does not change the owner and group of source vol‐
706 ume directories mounted into containers. If a container is created in a
707 new user namespace, the UID and GID in the container may correspond to
708 another UID and GID on the host.
709
710
711 The :U suffix tells Buildah to use the correct host UID and GID based
712 on the UID and GID within the container, to change the owner and group
713 of the source volume.
714
715
716 Labeling Volume Mounts
717
718
719 Labeling systems like SELinux require that proper labels are placed on
720 volume content mounted into a container. Without a label, the security
721 system might prevent the processes running inside the container from
722 using the content. By default, Buildah does not change the labels set
723 by the OS.
724
725
726 To change a label in the container context, you can add either of two
727 suffixes :z or :Z to the volume mount. These suffixes tell Buildah to
728 relabel file objects on the shared volumes. The z option tells Buildah
729 that two containers share the volume content. As a result, Buildah la‐
730 bels the content with a shared content label. Shared volume labels al‐
731 low all containers to read/write content. The Z option tells Buildah
732 to label the content with a private unshared label. Only the current
733 container can use a private volume.
734
735
736 Overlay Volume Mounts
737
738
739 The :O flag tells Buildah to mount the directory from the host as a
740 temporary storage using the Overlay file system. The RUN command con‐
741 tainers are allowed to modify contents within the mountpoint and are
742 stored in the container storage in a separate directory. In Overlay FS
743 terms the source directory will be the lower, and the container storage
744 directory will be the upper. Modifications to the mount point are de‐
745 stroyed when the RUN command finishes executing, similar to a tmpfs
746 mount point.
747
748
749 Any subsequent execution of RUN commands sees the original source di‐
750 rectory content, any changes from previous RUN commands no longer ex‐
751 ists.
752
753
754 One use case of the overlay mount is sharing the package cache from the
755 host into the container to allow speeding up builds.
756
757
758 Note:
759
760
761 - The `O` flag is not allowed to be specified with the `Z` or `z` flags. Content mounted into the container is labeled with the private label.
762 On SELinux systems, labels in the source directory needs to be readable by the container label. If not, SELinux container separation must be disabled for the container to work.
763 - Modification of the directory volume mounted into the container with an overlay mount can cause unexpected failures. It is recommended that you do not modify the directory until the container finishes running.
764
765
766
767 By default bind mounted volumes are private. That means any mounts done
768 inside container will not be visible on the host and vice versa. This
769 behavior can be changed by specifying a volume mount propagation prop‐
770 erty.
771
772
773 When the mount propagation policy is set to shared, any mounts com‐
774 pleted inside the container on that volume will be visible to both the
775 host and container. When the mount propagation policy is set to slave,
776 one way mount propagation is enabled and any mounts completed on the
777 host for that volume will be visible only inside of the container. To
778 control the mount propagation property of the volume use the
779 :[r]shared, :[r]slave, [r]private or [r]unbindablepropagation flag. The
780 propagation property can be specified only for bind mounted volumes and
781 not for internal volumes or named volumes. For mount propagation to
782 work on the source mount point (the mount point where source dir is
783 mounted on) it has to have the right propagation properties. For shared
784 volumes, the source mount point has to be shared. And for slave vol‐
785 umes, the source mount has to be either shared or slave. [1] ⟨#Foot‐
786 note1⟩
787
788
789 Use df <source-dir> to determine the source mount and then use findmnt
790 -o TARGET,PROPAGATION <source-mount-dir> to determine propagation prop‐
791 erties of source mount, if findmnt utility is not available, the source
792 mount point can be determined by looking at the mount entry in
793 /proc/self/mountinfo. Look at optional fields and see if any propaga‐
794 tion properties are specified. shared:X means the mount is shared,
795 master:X means the mount is slave and if nothing is there that means
796 the mount is private. [1] ⟨#Footnote1⟩
797
798
799 To change propagation properties of a mount point use the mount com‐
800 mand. For example, to bind mount the source directory /foo do mount
801 --bind /foo /foo and mount --make-private --make-shared /foo. This will
802 convert /foo into a shared mount point. The propagation properties of
803 the source mount can be changed directly. For instance if / is the
804 source mount for /foo, then use mount --make-shared / to convert / into
805 a shared mount.
806
807
809 buildah from --pull imagename
810
811
812 buildah from --pull docker://myregistry.example.com/imagename
813
814
815 buildah from docker-daemon:imagename:imagetag
816
817
818 buildah from --name mycontainer docker-archive:filename
819
820
821 buildah from oci-archive:filename
822
823
824 buildah from --name mycontainer dir:directoryname
825
826
827 buildah from --pull-always --name "mycontainer" docker://myregistry.ex‐
828 ample.com/imagename
829
830
831 buildah from --tls-verify=false myregistry/myrepository/imagename:im‐
832 agetag
833
834
835 buildah from --creds=myusername:mypassword --cert-dir ~/auth myreg‐
836 istry/myrepository/imagename:imagetag
837
838
839 buildah from --authfile=/tmp/auths/myauths.json myregistry/myreposi‐
840 tory/imagename:imagetag
841
842
843 buildah from --memory 40m --cpu-shares 2 --cpuset-cpus 0,2 --secu‐
844 rity-opt label=level:s0:c100,c200 myregistry/myrepository/imagename:im‐
845 agetag
846
847
848 buildah from --ulimit nofile=1024:1028 --cgroup-parent
849 /path/to/cgroup/parent myregistry/myrepository/imagename:imagetag
850
851
852 buildah from --volume /home/test:/myvol:ro,Z myregistry/myreposi‐
853 tory/imagename:imagetag
854
855
856 buildah from -v /home/test:/myvol:z,U myregistry/myrepository/image‐
857 name:imagetag
858
859
860 buildah from -v /var/lib/yum:/var/lib/yum:O myregistry/myrepository/im‐
861 agename:imagetag
862
863
864 buildah from --arch=arm --variant v7 myregistry/myrepository/image‐
865 name:imagetag
866
867
869 BUILD_REGISTRY_SOURCES
870
871
872 BUILD_REGISTRY_SOURCES, if set, is treated as a JSON object which con‐
873 tains lists of registry names under the keys insecureRegistries,
874 blockedRegistries, and allowedRegistries.
875
876
877 When pulling an image from a registry, if the name of the registry
878 matches any of the items in the blockedRegistries list, the image pull
879 attempt is denied. If there are registries in the allowedRegistries
880 list, and the registry's name is not in the list, the pull attempt is
881 denied.
882
883
884 TMPDIR The TMPDIR environment variable allows the user to specify where
885 temporary files are stored while pulling and pushing images. Defaults
886 to '/var/tmp'.
887
888
890 registries.conf (/etc/containers/registries.conf)
891
892
893 registries.conf is the configuration file which specifies which con‐
894 tainer registries should be consulted when completing image names which
895 do not include a registry or domain portion.
896
897
898 policy.json (/etc/containers/policy.json)
899
900
901 Signature policy file. This defines the trust policy for container im‐
902 ages. Controls which container registries can be used for image, and
903 whether or not the tool should trust the images.
904
905
907 buildah(1), buildah-pull(1), buildah-login(1), docker-login(1), name‐
908 spaces(7), pid_namespaces(7), containers-policy.json(5), contain‐
909 ers-registries.conf(5), user_namespaces(7)
910
911
913 1: The Buildah project is committed to inclusivity, a core value of
914 open source. The master and slave mount propagation terminology used
915 here is problematic and divisive, and should be changed. However, these
916 terms are currently used within the Linux kernel and must be used as-is
917 at this time. When the kernel maintainers rectify this usage, Buildah
918 will follow suit immediately.
919
920
921
922buildah March 2017 buildah-from(1)