Skip to content

Add rootless Podman support (RHEL 9+, SELinux, sibling containers) - #436

Draft
mlevans0 wants to merge 6 commits into
masterfrom
mle-podman-support
Draft

Add rootless Podman support (RHEL 9+, SELinux, sibling containers)#436
mlevans0 wants to merge 6 commits into
masterfrom
mle-podman-support

Conversation

@mlevans0

Copy link
Copy Markdown
Collaborator

Description

Adds support for running Overleaf Server Pro on rootless Podman (RHEL 9+ family), including sibling containers and SELinux enforcing mode.

Main changes:

  • New bin/podman-setup script — validates and (with --apply) auto-fixes a RHEL-based host for rootless Podman: required packages, user lingering, the Podman user socket, DOCKER_HOST wiring in config/overleaf.rc, the seccomp profile, and the SELinux policy module. Exit codes distinguish all-clear / warnings / failures, and dry-run is the default.
  • New SELinux policy module (lib/podman_socket_clsi.te) — allows the sharelatex container to connect to the rootless Podman socket for sibling-container compiles while SELinux stays in Enforcing mode.
  • New seccomp profile (lib/clsi-profile.json) — profile for CLSI sandboxed compiles under Podman, wired up via SECCOMP_PROFILE in variables.env.
  • bin/doctor extended — now reports the container runtime (Docker vs Podman), resolved socket path, DOCKER_HOST configuration, SELinux status/module/rules, seccomp profile presence, and host→socket / container→socket connectivity checks, with actionable warnings for each misconfiguration. The quay.io login check was also refactored into a shared helper.
  • lib/shared-functions.sh — new shared helpers for Podman detection, socket path resolution, SELinux module/rule checks, seccomp config checks, and quay.io login detection, used by both doctor and podman-setup.
  • Compose file tweaks — minor adjustments to the base, mongo, redis, and git-bridge compose files for Podman compatibility.

Existing Docker-based setups are unaffected: Podman-specific checks and warnings only activate when Podman is detected.

Related issues / Pull Requests

Contributor Agreement

@mlevans0
mlevans0 requested a review from mserranom August 17, 2026 12:00
@mserranom

Copy link
Copy Markdown
Contributor

Tested, overall looks ready to offer initial support. Some notes:

  • The seccomp could potentially be extracted from the image, but I think we're OK including it in the repo, it's pretty much immutable.
  • The only change I can think of: add a limited support/experimental warning on podman-setup, and on bin/up.

We should also draft documentation changes before making these changes available.

@das7pad would you mind having a look as well?

Comment thread bin/doctor Outdated
if [[ "$docker_server_version" =~ ^([0-9]+)\.([0-9]+) ]]; then
local major="${BASH_REMATCH[1]}"
local minor="${BASH_REMATCH[2]}"
if [[ "$major" -lt 23 ]]; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

https://endoflife.date/docker-engine

Only 25 and 29 are supported upstream.

Comment thread lib/podman_socket_clsi.te Outdated

# This module grants the sharelatex container permission to
# interact with the rootless Podman socket under SELinux enforcing.
# The socket lives at /run/user/$UID/podman/podman.sock with context user_tmp_t.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we switch the context for the socket instead?

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