Snap inside a container

Hello,

I have a Archlinux host with an Archlinux container. I am trying to use snap in the container. Unfortunately it fails to install anything.

# snap install nextcloud
error: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount:
       /tmp/sanity-mountpoint-002248366: mount failed: Operation not permitted.

The host itself uses snap to install LXD. Is there any reason why the container is not able to use squashfs?

Thanks

This suggests your system may be missing something required by snapfuse (fork of squashfuse) making it unable to mount the snap.

I’m not familiar with the ArchLinux kernel and its FUSE setup, but you’d need /dev/fuse available in the container and functional. You could test FUSE on its own with something like sshfs, if that behaves, the snapd should behave too…

I installed squashfuse package in the container and also did

lxc config set mycontainer linux.kernel_modules loop

After this i was able to install snap packages.