Repository navigation
Fix/docker binary name - #514
Conversation
The image ran the server as root. It now runs as 65532:65532, which owns the two directories the server writes to: - /var: the SQLite database (var/etherpad.db) and the update state, as before; - /data: settings.json (ETHERPAD_SETTINGS_PATH=/data), also as saved in the admin UI. / is not writable for the user any more. settings.json is read from ETHERPAD_SETTINGS_PATH when that holds one, otherwise from the working directory as before, so a file mounted at /settings.json keeps working. The admin UI reads the same file the server read and saves into ETHERPAD_SETTINGS_PATH (before, it could read and write another file than the one the server started with). `config get` loads the settings like `config show`, instead of showing defaults only. A /var volume from an older image belongs to root; the README shows the one-time chown. The kubernetes job runs the pods with runAsNonRoot and checks the user and the writable directories. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012RMvvMtnCwj6ycD9fwLYVu
Review fixes for the unprivileged image: - ETHERPAD_SETTINGS_FILE names settings.json (the image: /data/settings.json); ETHERPAD_SETTINGS_PATH stays the root (/ in the image), so /APIKEY.txt and relative favicon paths resolve as before. - The read and save locations are settled once at start (Settings. SettingsFile/SettingsSaveFile) and used by the start and the admin UI alike: the UI no longer shows one file and saves another, e.g. next to the executable, that the next start does not read. - Only a missing settings.json counts as missing. A file that is there but cannot be reached (no permission) stops the start, instead of starting on defaults without the configured requireAuthentication; so does a settings.json that does not parse (before, the server went on with empty settings). - config get/show read the settings without the server's setup, so a query creates no database directory. - README: a host directory bind-mounted at /var or /data keeps its owner and must be writable for 65532. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012RMvvMtnCwj6ycD9fwLYVu
feat(docker): run the server as an unprivileged user
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoRun Docker images as non-root and align settings file handling
AI Description
Diagram
High-Level Assessment
Files changed (13)
|
Code Review by Qodo
1.
|
Review fixes for the unprivileged image: - The image has a /tmp (1777): the PDF export attaches the pad and the PDF import restores it through a temporary directory. Without one the export dropped the attachment and the import fell back to text. - pdfcpu no longer creates its config directory ($HOME/.config/pdfcpu): without a home it tried /.config, which the user may not create, and pdfcpu panicked in the PDF export. Attaching and extracting files need none of that configuration. - The admin UI loads the file saves go to, and the file the server started with only while nothing was saved: a reload after a save shows what was saved, not the mounted /settings.json, so a second save cannot undo the first. The PDF layout test now also checks that the pad is attached and the link annotation survives attaching it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012RMvvMtnCwj6ycD9fwLYVu
No description provided.