question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Persisting plugins on the docker host

See original GitHub issue

Hello, I’m running etherpad-lite through docker (17.05.0-ce, build 89658b). It works well, but when I restart the container, plugins which were installed through the admin interface are lost.

I thought it would only require bind-mounting the plugin folders to the docker host, but the symlink (ep_etherpad-lite -> ../src) located in /opt/etherpad-lite/node_modules does not seem to survive the mounting — even if the file paths of the container are mimicked on the host like below.

Any ideas on how to fix this?

version: '3.4'

services:
  etherpad:
    build: .
    container_name: etherpad
    networks:
      - my-network
    volumes:
      - ./settings.json:/opt/etherpad-lite/settings.json:ro
      - /opt/etherpad-lite/var:/opt/etherpad-lite/var
      - /opt/etherpad-lite/node_modules:/opt/etherpad-lite/node_modules
      - /opt/etherpad-lite/src:/opt/etherpad-lite/src
    environment:
      - NODE_ENV=production

networks:
  my-network:
    external:
      name: ${DOCKER_NETWORK}

The container throws the following error upon startup:

internal/modules/cjs/loader.js:651
    throw err;
    ^

Error: Cannot find module '/opt/etherpad-lite/node_modules/ep_etherpad-lite/node/server.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:649:15)
    at Function.Module._load (internal/modules/cjs/loader.js:575:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:862:12)
    at internal/main/run_main_module.js:21:11

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
pecuchetcommented, Apr 13, 2019

Hi @muxator, I ended up choosing a more righteous path and steering my soul clear of devilish security torments… This is simply what I did:

FROM etherpad/etherpad:latest
RUN npm i ep_mypads

Of course it doesn’t solve the problem of plugins installed at run-time. But it could be an idea to give the possibility to install plugins through a built-time argument (docker build --build-arg and a default Dockerfile ARG). This way, all what pertains to the software resides in the image, which adheres to Docker’s concept of images and containers.

0reactions
stale[bot]commented, Jun 4, 2020

This issue 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use Docker Engine plugins
A volume plugin that provides access to an extensible set of container-based persistent storage options. It supports single and multi-host Docker environments ...
Read more >
Docker Wordpress plugins persistence or mapping to local ...
Yes, there is a way. You firstly need to rearrange directorys structure. On your host machine, your using themes directory for mount point....
Read more >
Persistent Storage for Containers: Stateful Apps in Docker
Ondat is a Docker volume plugin that enables persistent storage for Docker. Ondat is a single container that includes both the data plane,...
Read more >
Docker local-persist volume plugin with example ... - YouTube
Docker volume plugin "local- persist " compared with default "local" driver and container mount types described.
Read more >
Managing Persistence for Docker Containers - The New Stack
For example, the data aggregated by the master container is processed by a worker container. Volume Plugins. Although host-based persistence is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found