SEPIA-Framework / sepia-docs

Documentation and Wiki for SEPIA. Please post your questions and bug-reports here in the issues section! Thank you :-)
https://sepia-framework.github.io/
238 stars 16 forks source link

Docker Issue Mounting of Shared Folder #230

Open K44nk1231 opened 1 year ago

K44nk1231 commented 1 year ago

Hi, I am absolutely new with all of this so please excuse me for stupid questions.

However, I am trying to install the docker container for Sepia-home on my Synology NAS running DSM 7.1.1-42962 Update 1 every time I install the container with the mounted volume, the container stops and I become the error in the log:

2023_03_24_10:45:05 - DOCKER START 2023_03_24_10:45:05 - Checking data folder '/home/admin/sepia-home-data' ... 2023_03_24_10:45:05 - Data is MISSING - Is your shared volume set up properly? 2023_03_24_10:45:05 - Please make sure your folder is EMPTY when you create the volume! 2023_03_24_10:45:05 - 'docker run' argument: '-v sepia-home-share:/home/admin/sepia-home-data' 2023_03_24_10:45:05 - EXIT

I have the same issue whether I install the container via the Synology UI or through ssh. My command through ssh looks like this:

sudo docker run --rm -it --name=sepia_home -p 9010:20726 -v /volume1/docker/Sepia/home/admin/sepia-home-data/:/home/admin/sepia-home-data sepia/home:latest

Since I am able to see the log file in the mounted folder, I believe the mounting has worked correctly. However, if I start the container without mounting the shared folder, it starts just fine.

Any help would be greatly appreciated! Thanks regards, K44nk1231

plantroon commented 1 year ago

You should use a docker volume instead as is stated in the docs. So -v sepia-home-data:/home/admin/sepia-home-data but I understand that this may not be desirable if you want to specify which disk to save the data on and cannot do so on your docker setup (which was my case). In my quick testing I was unable to make it work with the directory itself. So I use the docker volume.

fquirin commented 1 year ago

Sorry I'm a bit overwhelmed by work atm but I'll try to make the steps more clear and add some examples.

The important part is that the container needs to copy data to your shared volume when you mount it. This only happens when your folder is empty before mounting but basically should work for volumes and "bind mounts": https://docs.docker.com/storage/#tips-for-using-bind-mounts-or-volumes

Maybe your folder wasn't empty because of some hidden OS files?