intel / bmap-tools

BMAP Tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Podman + fuse-overlayfs errors on Fedora (Selinux)

jwinarske opened this issue · comments

Running container via Podman on Fedora 34 I am seeing some errors similar to zfs issue. fuse-overlayfs is required to work around Selinux issue for Yocto build. containers/podman#5781

podman --storage-opt overlay.mount_program=/usr/bin/fuse-overlayfs --storage-opt overlay.mountopt=nodev,metacopy=on,noxattrs=1 run ...

| bmaptools.Filemap.ErrorNotSupp: FilemapFiemap: the FIEMAP ioctl is not supported by the file-system

| bmaptools.Filemap.ErrorNotSupp: the file-system does not support "SEEK_HOLE" and "SEEK_DATA" but only provides a stub implementation

Hi Joel,

I too faced the same issue and it was resolved by providing -v option.

The option -v mounts the host directory $PWD/yocto/output in the container directory /home/dev/yocto/output. It makes all the Yocto build artefacts available on the host computer and makes them persistent between two Docker runs.

podman --storage-opt overlay.mount_program=/usr/bin/fuse-overlayfs --storage-opt overlay.mountopt=nodev,metacopy=on,noxattrs=1 run -it -v $PWD/yocto/output:/home/dev/yocto/output

@sivaece06 Thanks for the clue! I ended up with this:

dockerfile

RUN adduser --disabled-password --gecos '' dev
RUN chown -R dev:dev /home/dev
…
USER dev

user dev defaults to uid 1000

Execution

$ mkdir -p $PWD/yocto/$TARGET  
$ podman unshare chown 1000:1000 -R $PWD/yocto/$TARGET
$ podman --storage-opt overlay.mount_program=/usr/bin/fuse-overlayfs --storage-opt overlay.mountopt=nodev,metacopy=on,noxattrs=1 run --security-opt seccomp=unconfined -it -v $PWD/yocto/$TARGET:/home/dev/tmp:Z ...