Closed gpopesc closed 3 years ago
You need to run in privileged container or add the proper capabilities needed for user namespaces.
In rootful container, this means adding the --privileged=true
option.
In rootless container, add --cap-add=NET_ADMIN
--cap-add=CAP_SYS_ADMIN
options.
thank you @tinywrkb for your advice.
what I discovered:
after I build the container, running ubuntu, I can install WPS office with following setting in docker-compose. Only with NET_ADMIN and SYS_ADMIN is not enough. On top of that I had to execute following command in order to avoid bwrap error:
chmod u+s /usr/bin/bwrap
cap_add:
- NET_ADMIN
- SYS_ADMIN
- SYS_PTRACE
- SYS_CHROOT
security_opt:
- seccomp:unconfined
- apparmor:unconfined
Finally after installation I had to copy desktop icons and mount home inside flatpak
sudo cp /var/lib/flatpak/exports/share/applications/*wps*.desktop /usr/share/applications/ sudo flatpak override com.wps.Office --filesystem=home
I am not very happy with so many rights assigned to the container, but otherwise it is not working. On the other hand it is self build and I know that it safe.
The new version of WPS office(from August) can be installed in docker only with flatpak as described above. The standard version from website with deb file it is not running and it doesn't return any errors.
Hello
I am trying to install flatpak with WPS in docker container and build the application in Dockerfile based on ubuntu 20.04. I managed to install flatpak, but when I try to instrall WPS office I get this warning:
bwrap: Creating new namespace failed: Operation not permitted
Warning: While trying to apply extra data: apply_extra script failed, exit status 256
then in next step I get:
error: Failed to install com.wps.Office: While trying to apply extra data: apply_extra script failed, exit status 256
The command '/bin/sh -c flatpak install flathub com.wps.Office -y' returned a non-zero code: 1
On the other hand, if I install other apps like chess in flatpak I got only the first warning and the apps was installed.
Any ideas how to solve this error?
Thanks