buildah-run(1) General Commands Manual buildah-run(1) (NAME) buildah-run - (SYNOPSIS) buildah run [] [--] (DESCRIPTION) buildah config . buildah run (interactive shell) --tty . (OPTIONS) --add-history . false . : --add-history BUILDAH_HISTORY . export BUILDAH_HISTORY=true --cap-add=CAP_xxx (capability) . --cap-add --cap-drop buildah from . --cap-drop=CAP_xxx . CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER CAP_FSETID CAP_KILL CAP_NET_BIND_SERVICE CAP_SETFCAP CAP_SETGID CAP_SETPCAP CAP_SETUID --cap-add --cap-drop buildah from . containers.conf(5) . --cap-add --cap-drop . --cgroupns how cgroup . "" ( ) "private" cgroup "host" cgroup buildah . --contextdir directory RUN . RUN --mount 'bind' . --device=device . permissions r (read) w (write) m mknod(2) . : --device=/dev/sdc:/dev/xvdc:rwm. : host-device (symbolic link) . (major) (minor) . (CDI) (https://github.com/cncf-tags/container-device-interface). : (rootless) . crun(1) --annotation run.oci.keep_original_groups=1 . --env, -e env=value ( env=value) . buildah config --env buildah run . . --hostname (hostname) . --ipc how IPC . "" ( ) "private" IPC "host" IPC buildah IPC . --isolation type (isolation) . oci ( OCI ) rootless ( OCI --no-new-keyring create UTS IPC PID mount ) chroot ( chroot(1) cgroup IPC PID mount UTS ) . : BUILDAH_ISOLATION . export BUILDAH_ISOLATION=oci --mount=type=TYPE,TYPE-SPECIFIC-OPTION[,...] (mount) (TYPES) bind cache secret tmpfs . bind tmpfs cache . e.g. type=bind,source=/path/on/host,destination=/path/in/container type=tmpfs,tmpfs-size=512M,destination=/path/in/container type=cache,target=/path/in/container Common Options ( ): . src, source: bind cache. bind . `from` `src` `from` . . dst, destination, target: . . ro, read-only: ( `type=bind` true `type=tmpfs` `type=cache` false). . rw, read-write: ( `type=bind` false `type=tmpfs` `type=cache` true). Options specific to bind ( bind): . bind-propagation: shared slave private rshared rslave rprivate (). mount(2) . [[1]](#Footnote1) . bind-nonrecursive: bind . . . from: . **--contextdir** **--contextdir** . . src: ( **from** ) . . z: SELinux . SELinux . . Z: SELinux . SELinux . Options specific to tmpfs ( tmpfs): . tmpfs-size: tmpfs . . . tmpfs-mode: tmpfs . ( 700 0700). 1777 . . tmpcopyup: tmpfs tmpfs . Options specific to secret ( secret): . id: (secret) `buildah bud --secret` `podman build --secret`. Options specific to cache ( cache): . id: . . mode: . 0755. . src: ( **from** ) . . uid: uid . . gid: gid . . from: (stage) . . . sharing: (`sharing=locked`) (`sharing=shared` ). . z: SELinux . SELinux . . Z: SELinux . SELinux . --network, --net=mode . mode : o none: . --dns --dns-option --dns- search o host: . : host D-Bus o ns:path: o private: () o : --network mynet mynet. (rootful) . o pasta[:OPTIONS,...]: pasta(1) (user-mode). (rootless) . IPv4 IPv6 pod . (port forwarding) ( init ) . IP . pasta(1) . pasta(1) --config-net --no-map-gw (gateway) . --map-gw pasta ( pasta(1) ). -t none -u none . -T none -U none . : o pasta:--map-gw: (gateway) . o pasta:--mtu,1500: MTU tap . o pasta:--ipv4-only,-a,10.0.2.0,-n,24,-g,10.0.2.2,--dns- forward,10.0.2.3,-m,1500,--no-ndp,--no-dhcpv6,--no-dhcp IPv6 10.0.2.0/24 tap0 10.0.2.3 DNS 10.0.2.3 MTU NDP DHCPv6 DHCP. o pasta:-I,tap0,--ipv4-only,-a,10.0.2.0,-n,24,-g,10.0.2.2,--dns- forward,10.0.2.3,--no-ndp,--no-dhcpv6,--no-dhcp MTU o pasta:-t,auto,-u,auto,-T,auto,-U,auto: o pasta:-T,5201: TCP loopback tap --no-hostname /etc/hostname RUN . Buildah /etc/hostname . --no-hostname /etc/hostname . --no-hosts /etc/hosts RUN . Buildah /etc/hosts IP . --no-hosts /etc/hosts . --no-pivot pivot_root rootfs . rootfs (ramdisk) . : BUILDAH_NOPIVOT . export BUILDAH_NOPIVOT=true --pid how PID . "" ( ) "private" PID "host" PID buildah PID . --runtime path (path) OCI. runc crun cgroups V2 . : BUILDAH_RUNTIME . export BUILDAH_RUNTIME=/usr/bin/crun --runtime-flag flag . (manpages) . : -- . runc --log-format json buildah run --runtime-flag log-format=json . --tty, --terminal, -t (pseudo-TTY) buildah pseudo-TTY . --tty true "" stdin stdout . --tty false . --user user[:group] (user) . UID GID (':') . /etc/passwd /etc/group . --uts how UTS . "" ( ) "private" UTS "host" UTS buildah UTS . --valid-exit-codes exitcode[,exitcode,...] . 0 . --volume, -v source:destination:options (bind mount) . -v /HOST- DIR:/CONTAINER-DIR Buildah /HOST-DIR /CONTAINER-DIR Buildah (bind mount) . OPTIONS : o [rw|ro] o [U] o [z|Z] o [[r]shared|[r]slave|[r]private] [1] <#Footnote1> CONTAINER-DIR /src/docs . HOST- DIR . Buildah HOST-DIR bind mount . /foo Buildah /foo bind mount . -v . (Write Protected Volume Mounts) :ro :rw - . - . . (Chowning Volume Mounts) Buildah . UID GID UID GID . :U Buildah UID GID UID GID . (Labeling Volume Mounts) SELinux . . Buildah . :z :Z . Buildah . z Buildah . Buildah . / . Z Buildah . . bind mount private . . (propagation property) . shared . slave . :[r]shared :[r]slave :[r]private . bind mount . ( ) . shared shared . slave shared slave . [1] <#Footnote1> df findmnt -o TARGET,PROPAGATION findmnt /proc/self/mountinfo . optional fields . shared:X shared master:X slave private . [1] <#Footnote1> mount . bind mount /foo mount --bind /foo /foo mount --make- private --make-shared /foo . /foo shared . . / /foo mount --make-shared / / shared . --workingdir directory (directory) . buildah config --workingdir buildah run . : -- . (EXAMPLES) buildah run containerID -- ps -auxw buildah run --hostname myhost containerID -- ps -auxw buildah run containerID -- sh -c 'echo $PATH' buildah run --runtime-flag log-format=json containerID /bin/bash buildah run --runtime-flag debug containerID /bin/bash buildah run --tty containerID /bin/bash buildah run --tty=false containerID ls / buildah run --volume /path/on/host:/path/in/container:ro,z containerID sh buildah run -v /path/on/host:/path/in/container:z,U containerID sh buildah run --mount type=bind,src=/tmp/on:host,dst=/in:container,ro containerID sh buildah run --valid-exit-codes 0,1 containerID grep pattern /etc/hosts (SEE ALSO) buildah(1), buildah-from(1), buildah-config(1), namespaces(7), pid_namespaces(7), crun(1), runc(8), containers.conf(5) (FOOTNOTES) 1: Buildah () . (mount propagation) master slave . . Buildah . buildah March 2017 buildah-run(1)