Persisting plugins on the docker host
See original GitHub issueHello,
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:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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:
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 DockerfileARG
). This way, all what pertains to the software resides in the image, which adheres to Docker’s concept of images and containers.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.