vwout / docker-openluup

Dockerized openLuup environment with AltUI
https://hub.docker.com/r/vwout/openluup/
Apache License 2.0
3 stars 2 forks source link

/bin/sh: 1: /etc/cmh-ludl/openLuup_reload_for_docker: not found #1

Closed RHCPNG closed 5 years ago

RHCPNG commented 5 years ago

Hi vwout,

Thanks for your docker! I'm trying to run it on openmediavault and I'm using a GUI to create the docker, but I get this error in the subject.

I think it has to do with the volumes, these are apparently empty. But I'm used to doing it this way, but with your docker it doesn't seem to work. Can you help me out?

Regards,

Niels

image image

vwout commented 5 years ago

The reason that it does not work is that you use binds instead of volumes. When an empty (new) volume is mounted in a container, Docker will copy the data from the container to the mounted volume at first start. On the contrary, when binding a directory from your host, Docker will never do this. The solution to persist your data is to created (named) volumes instead of binds.

If you want to use binds, you need to apply some bootstrapping:

  1. Start an OpenLuup container without any volumes
  2. Copy the data from your container /etc/cmh-ludl/ to you hosts directory, e.g. /srv/dockers/openluup/cmh-ludl/
  3. Remove the container
  4. Start the container as how you configured it in the screenshots above.
RHCPNG commented 5 years ago

Thanks for your answer! I will try your solution and let you know.

Is it also possible to make the docker work with bindings? Because my experience is that most dockers work that way.

vwout commented 5 years ago

You can use binds for any volume except for /etc/cmh-ludl/. Typical software separates code from configuration. Vera luup on the contrary is different and hence also Openluup. This specific location is where Vera stores all luup and plugin files, including configuration. The volume for /etc/cmh-ludl/ contains the actual OpenLuup installation. It thus belongs to the image. Reason that you want to store it in a volume is that this volume allows you to preserve installed plugins and your configuration. It will survive recreation of the openluup container instance.

If you handle your data in spirit of containerization, it should be portable, A container can run anywhere. Using binds ties storage to a machine (typically, with default storage providers). Using volumes abstracts from that, which is why Docker prefers that approach.

RHCPNG commented 5 years ago

Thanks for your detailed explanation, vwout!

I will read up on how to use this structurally in the future.