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

NAME

6       buildah-mount - Mount a working container's root filesystem.
7
8

SYNOPSIS

10       buildah mount [container ...]
11
12

DESCRIPTION

14       Mounts  the  specified container's root file system in a location which
15       can be accessed from the host, and returns its location.
16
17
18       If the mount command is invoked without any arguments,  the  tool  will
19       list all of the currently mounted containers.
20
21
22       When  running  in rootless mode, mount runs in a different namespace so
23       that the mounted volume might not be accessible from the host when  us‐
24       ing  a driver different than vfs.  To be able to access the file system
25       mounted, you might need to create the  mount  namespace  separately  as
26       part  of  buildah unshare.  In the environment created with buildah un‐
27       share you can then use buildah mount and have  access  to  the  mounted
28       file system.
29
30

RETURN VALUE

32       The  location of the mounted file system.  On error an empty string and
33       errno is returned.
34
35

OPTIONS

37       --json
38
39
40       Output in JSON format.
41
42

EXAMPLE

44              buildah mount working-container
45              /var/lib/containers/storage/overlay2/f3ac502d97b5681989dff84dfedc8354239bcecbdc2692f9a639f4e080a02364/merged
46
47
48
49              buildah mount
50              working-container /var/lib/containers/storage/overlay2/f3ac502d97b5681989dff84dfedc8354239bcecbdc2692f9a639f4e080a02364/merged
51              fedora-working-container /var/lib/containers/storage/overlay2/0ff7d7ca68bed1ace424f9df154d2dd7b5a125c19d887f17653cbcd5b6e30ba1/merged
52
53
54
55              buildah mount working-container fedora-working-container ubi8-working-container
56              working-container /var/lib/containers/storage/overlay/f8cac5cce73e5102ab321cc5b57c0824035b5cb82b6822e3c86ebaff69fefa9c/merged
57              fedora-working-container /var/lib/containers/storage/overlay/c3ec418be5bda5b72dca74c4d397e05829fe62ecd577dd7518b5f7fc1ca5f491/merged
58              ubi8-working-container /var/lib/containers/storage/overlay/03a071f206f70f4fcae5379bd5126be86b5352dc2a0c3449cd6fca01b77ea868/merged
59
60
61
62       If running in rootless mode, you need to do a buildah unshare first  to
63       use the mount point.
64
65
66              $ buildah unshare
67              # buildah mount working-container
68              /var/lib/containers/storage/overlay/f8cac5cce73e5102ab321cc5b57c0824035b5cb82b6822e3c86ebaff69fefa9c/merged
69              # cp foobar  /var/lib/containers/storage/overlay/f8cac5cce73e5102ab321cc5b57c0824035b5cb82b6822e3c86ebaff69fefa9c/merged
70              # buildah unmount working-container
71              # exit
72              $ buildah commit  working-container newimage
73
74
75

SEE ALSO

77       buildah(1), buildah-unshare(1), buildah-umount(1)
78
79
80
81buildah                           March 2017                  buildah-mount(1)
Impressum