Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Rootless containers #2029

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

emrahcom
Copy link
Contributor

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 /run by using templates and provided config files (from /config)

  • The writable folders for s6 are:

    • /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:

    • /config contains read-only config files
    • /storage contains created files during the runtime such as recordings, logs, etc.
    • /tmp contains 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,transcripts}
chmod 777 ~/.jitsi-meet-cfg/storage/jibri
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_ADMIN anymore. 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.

Copy link
Member

@saghul saghul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impressive work @emrahcom ! 👏 I left some comments, please take a look!

emrahcom and others added 2 commits February 24, 2025 14:11
Co-authored-by: Saúl Ibarra Corretgé <s@saghul.net>
Co-authored-by: Saúl Ibarra Corretgé <s@saghul.net>
@saghul
Copy link
Member

saghul commented Feb 24, 2025

Sorry for the exec comments, I got carried away during review ;-) I can make those after this lands.

@saghul
Copy link
Member

saghul commented Feb 24, 2025

I'll give this a try shortly @emrahcom, thanks a lot for the swift responses to my comments!

@emrahcom
Copy link
Contributor Author

Thank you very much for your helps.

@saghul
Copy link
Member

saghul commented Mar 4, 2025

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.

@emrahcom
Copy link
Contributor Author

emrahcom commented Mar 4, 2025

I will check the option to use ~/.jitsi-meet-cfg/storage/prosody as Prosody's data_path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants