Closed villytiger closed 4 years ago
By the way. If I specify storage-driver command line option, buildah reports error:
# buildah run --storage-driver overlay $container sh
ERRO[0000] 'overlay' is not supported over overlayfs
'overlay' is not supported over overlayfs: backing file system is unsupported for this graph driver
You have to volume mount in /var/lib/containers if you want to use overlay inside of a container running on overlay.
In rootless mode we are not using the kernels overlayfs we are using fuse-overlayfs, so it is allowed in this case.
In rootless mode we are not using the kernels overlayfs we are using fuse-overlayfs, so it is allowed in this case.
But it doesn't work in my case. If I run mkdir -p /home/user/.local/share/containers && chown -R user:user /home/user/.local && mount -t tmpfs tmpfs /home/user/.local/share/containers
before step 5, it does work.
It is a side question. But I wonder why nested overlay is not allowed?
You'll have to ask the kernel guys.
I am talking about in the podman command.
mkdir ./myuser chown myuser/ podman run -v ./myuser:/home/user ...
Yes, it must work. But this bug report about overlay mount in /home/user. Buildah has inadequate behavior in such case trying to mount an empty directory with hard to debug message about missing /bin/sh file. I see two options here:
I don't believe that happens with the latest fuse-overlayfs. Fuse-overlay will work on an Overlayfs file system, I believe. @giuseppe PTAL
native overlay cannot be nested as the whiteouts will confuse the different overlay layers.
fuse-overlayfs can be used on top of overlay. fuse-overlayfs will fall back to use .wh.FILE
whiteouts when whiteouts using mknod cannot be used.
Please be aware though that this use case is not really well tested so I'd still suggest to use a bind mount so that the storage inside the container is not on overlay.
I don't believe we have this issue any longer, reopen if I am mistaken.
Description
I'm trying to run buildah in rootless mode inside a container. So I have overlay mount as a rootfs. When I run buildah in root mode it reports that "'overlay' is not supported over overlayfs". However when I run it in rootless mode it silently uses some mix of overlay and vfs drivers. As a result I have an empty directory mount as a rootfs for new container.
Steps to reproduce the issue:
sudo podman run -it --rm --privileged fedora:30
yum install -y buildah
useradd -m -s /bin/bash user
chmod u+s /usr/bin/newuidmap /usr/bin/newgidmap
su user
container=$(buildah from fedora:30)
buildah run $container sh
buildah unshare
path=$(buildah mount $container)
ls $path
Describe the results you received:
Describe the results you expected:
I don't understand why overlay driver is not supported over overlayfs. I couldn't find any information about it. Is it also applicable to fuse-overlayfs?
If overlay driver can be used in my scenario, I'd expect buildah to use it. If it can't be used, I'd expect buildah to report about it and stop execution.
Output of
rpm -q buildah
orapt list buildah
:Output of
buildah version
:*Output of `cat /etc/release`:**
Output of
uname -a
:Output of
cat /etc/containers/storage.conf
:Output of
cat ~/.config/containers/storage.conf
: