docker: make plugin_packages volume mountpoint writable - #8042
Conversation
Create src/plugin_packages in the development and production runtime image stages so a fresh Docker named volume is initialized with Etherpad user ownership instead of root-only ownership. Fixes ether#8026
Replace CommonJS imports with Node.js module imports and reformat the test to match the project's coding style. This change is purely stylistic and does not alter the regression test's behavior.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
PR Summary by QodoDocker: create writable src/plugin_packages mountpoint in runtime images
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1.
|
Match Dockerfile instructions with regexes instead of exact substrings so the regression test validates the required behavior without rejecting harmless formatting or equivalent command changes.
|
I don't know enough about docker to approve this, @SamTV12345 is better placed |
This is completely vibed. The docker compose does not even mount the volume. So basically everything is lost as soon as the container restarts. Creating the directory also does not make sense. |
|
I think I mixed up the production and dev Compose paths here. Production's docker-compose.yml does mount: I'll re-run the repro against the exact Compose path from this issue and fix it to actually handle the persistence/permission behavior, not just the directory-creation case. Thanks. |
…ext test The reason the two `mkdir`s exist is not obvious from the Dockerfile, so state it where the next reader will be: a named volume inherits the mountpoint's ownership from the image, and USER is already etherpad at that point. Removes dockerfilePluginVolume.ts. It asserted that the Dockerfile *text* contains `mkdir -p ./src/plugin_packages` after the `COPY ./src` line — it fails when the Dockerfile is refactored (a `.gitkeep`, a `VOLUME`, a different order all keep the behaviour intact) and it cannot fail when the actual bug returns, since it never inspects a built image. The build-test job already builds both runtime stages. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Summary
Fixes #8026
This PR creates
src/plugin_packagesin both Docker runtime stages so plugin installation works when Etherpad is started with Docker Compose.When
docker-compose.ymlmounts a named volume oversrc/plugin_packages, Docker initializes a fresh named volume from the image mountpoint metadata. If the directory does not exist in the image, Docker creates it asroot:root, which prevents the Etherpad process from creatinginstall.lockduring plugin installation.What changed
src/plugin_packagesin the Dockerdevelopmentruntime stage.src/plugin_packagesin the Dockerproductionruntime stage.src.Testing
pnpm run testpnpm run lintpnpm run ts-checkNotes
This keeps the fix limited to the Docker runtime image setup. It does not change plugin installation logic, public APIs, database behavior, or configuration.