[SOLVED] Post-install issue with host/VM shared folders on Windows 8

When things don't work as they should.
Post Reply
maathieu
Posts: 15
Joined: Tue Dec 24, 2019 10:17 am

[SOLVED] Post-install issue with host/VM shared folders on Windows 8

Post by maathieu »

Hello,

I am trying to test Mayan on my personal Windows 8 (not 8.1) server following the standard documentation here .

The latest Docker software runs only on Windows 10 so I had to install a previous version known as "Docker Toolbox" from here.

I can't seem to be able to use the -v <host_folder_name>:/var/lib/mayan part of the standard docker run command-line, the files are created on the Docker instance but never appear in <host_folder_name> .

I tried to follow tutorials that said that folders have to be shared in VirtualBox configuration first, then manually mounted on the VirtualBox instance, in order to be made available for Docker, but when I try to edit /etc/fstab in the instance (using docker-machine ssh default) to get the mounts to persist at reboot, the file gets reset to its defaults as soon as I shutdown -r the VM.

So basically I am stuck there, also there are plenty of odd errors in the logs and I can't connect to it using my web browser, but I guess this is may be caused by the shared folder issue, so I want to make sure everything is cleaned up first before actually tackling the problem.

Can anyone point me to a tutorial for that specific Windows version?

Many thanks in advance,
Last edited by maathieu on Tue Dec 24, 2019 1:20 pm, edited 1 time in total.

maathieu
Posts: 15
Joined: Tue Dec 24, 2019 10:17 am

Re: Post-install issue with host/VM shared folders on Windows 8

Post by maathieu »

I got it to work!

It goes two fold. After installing Docker Toolbox and before running any of the the mayan-edms setup commands, you need to open the Oracle VM VirtualBox Machine Manager. Select the "default" machine and click "Configuration", then go to "Shared Folders".

Add a permanent shared folder named "mayan_media" pointing to your hosts's filesystem c:\whatever\mayan-edms\media directory. Check the boxes "Auto mount" and "Permanent configuration" and save.

Then, Shut down the virtual machine by right-clicking on it and do Close > Shut down (Or Ctrl+F). Once it is off, start the VM again by right-clicking and do "Start" (for some reason the mounts would not be updated if I did "restart").

Wait for the VM to come up again and start Docker Quickstart terminal (if it says something about ssh error, then it is not started yet).

If you log in your VM using docker-machine ssh default and do cd / ; ls you will noew see your share as "/mayan_media". Try putting a file named test.txt on the share in windows, it should show up in the directory if you do ls /mayan_media

AFTERWARDS you need to run the initialization of your mayan docker container like this:

Code: Select all

docker run -d \
--name mayan-edms \
--restart=always \
-p 80:8000 \
-e MAYAN_DATABASE_ENGINE=django.db.backends.postgresql \
-e MAYAN_DATABASE_HOST=172.17.0.1 \
-e MAYAN_DATABASE_NAME=mayan \
-e MAYAN_DATABASE_PASSWORD=mayanuserpass \
-e MAYAN_DATABASE_USER=mayan \
-e MAYAN_DATABASE_CONN_MAX_AGE=0 \
-v /mayan_media:/var/lib/mayan \
mayanedms/mayanedms:<version>
(note that I changed/docker-volumes/mayan-edms/media into /mayan_media)

When this is running you can run docker exec -ti mayan-edms /bin/bash and cd /var/lib/mayan and you should see your file test.txt in there.

maathieu
Posts: 15
Joined: Tue Dec 24, 2019 10:17 am

Re: [SOLVED] Post-install issue with host/VM shared folders on Windows 8

Post by maathieu »

UPDATE: for those poor souls trying to do something with Windows 8, I posted a tutorial(ish) here.

Post Reply