docker-jitsi-meet
docker-jitsi-meet copied to clipboard
feat: Rootless containers
This PR allows Jitsi containers to run without using root account.
Main changes:
-
s6-overlay is upgraded to
v3.2.0.2 -
All processes are run by a non-root user:
s6 -
Currently, container's filesystem is still writable but the active user is
s6. So, it cannot write into the root's folders. -
Config files are created in
/runby using templates and provided config files (from/config) -
The writable folders for
s6are:- /run
- /tmp
- Folders in the mounted volumes with write permission (writable folders should have 777 as mode)
-
Volumes are updated to differ read-only and writable volumes:
/configcontains read-only config files/storagecontains created files during the runtime such as recordings, logs, etc./tmpcontains created temporary files the runtime
-
Expected folders on host:
mkdir -p ~/.jitsi-meet-cfg/prosody/{config,prosody-plugins-custom}
mkdir -p ~/.jitsi-meet-cfg/{jibri,jicofo,jigasi,jvb,web}
mkdir -p ~/.jitsi-meet-cfg/storage/{jibri,prosody,transcripts}
chmod 777 ~/.jitsi-meet-cfg/storage/jibri
chmod 777 ~/.jitsi-meet-cfg/storage/prosody
chmod 777 ~/.jitsi-meet-cfg/storage/transcripts
mkdir -p ~/.jitsi-meet-cfg/tmp/{web-crontabs,web-load-test}
chmod 777 ~/.jitsi-meet-cfg/tmp/web-crontabs
chmod 777 ~/.jitsi-meet-cfg/tmp/web-load-test
- jibri container doesn't have
CAPS_SYS_ADMINanymore. Therfore Chrome is run with--no-sandbox.
My plan is to create a second PR to make container's filesystem completely read-only after a while. Actually this also works in my test but I don't want to make it harder to debug.
Sorry for the exec comments, I got carried away during review ;-) I can make those after this lands.
I'll give this a try shortly @emrahcom, thanks a lot for the swift responses to my comments!
Thank you very much for your helps.
Hey @emrahcom quick update: I will start testing the end of this week or the next.
Something important we need to handle here is migrating the XMPP data from existing installations since it may contain user accounts.
I will check the option to use ~/.jitsi-meet-cfg/storage/prosody as Prosody's data_path.
I updated my first post (added ~/.jitsi-meet-cfg/storage/prosody).
A fix was added to get Prosody accounts from the old setup.
Hi @saghul, I have an idea that would make merging easier. This is:
- creating
baseandbase-javaimages on jitsi-contrib/docker-images - creating PR covering only one container at a time using the images from jitsi-contrib/docker-images
- when all PRs (except
baseandbase-java) are merged, updatingbaseandbase-javain this repo
Currently, this PR looks big and the repo is being updated all the time.
What do you think?
Hey @emrahcom ! So sorry for the delay, the Prosody 13 release has certainly stolen some cycles.
I think it's best to go all in here.
The conflicts should be easy to solve, we can likely do that before the merge.
I'm setting some time aside next week to test this properly.
Hi @saghul, if there is anything I can do to help the process, please let me know.
Hi @saghul, Germany's Center for Digitial Sovereignity (ZenDiS) was happy to sponsor this work as part of openDesk 🚀 .
We would like to see this integrated as soon as possible. Would you mind taking a look at this again?
This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.