How to install "docker" in a folder of a dedicated disk with clicks, for newbies like me who don't like the command line too much.
In my case the reason for doing this is that Jellyfin would not let me install the "config" folder in a SnapRaid array with UnionFS (After looking at the MergerFS Manual I found out why, you can see it on your page). Also I start OMV from a USB pendrive and I think that "docker" will work better on a dedicated disk (in my case I use a 60GB SSD disk), also placing there the "config" folders and so on of the applications that are installed through "docker" .
I have carried out the procedure without entering the command line, which generally gives us newbies a bit of respect ... or gets us out of our minds ... (I just wanted a home media server. Do I have to learn to program? Just kidding ... )
In the OMV GUI (I assume that OMV-Extras has already been installed, otherwise look for information in the forum, there is a lot), in the "System" section we click on "OMV-Extras", then we click the tab "Docker". The first box shows us the path where the "docker" packages will be installed, which by default is "/var/lib/docker" and what we want is to change this path to another hard drive in a custom folder.
To do this we must previously create this folder and then tell "docker" that it must be installed in this folder.
Step 1. Mount the dedicated drive.
Once the disk is connected to the computer we start OMV and we go to the "Storage" section, we click on "File system", the list of mounted disks that we have in the system will appear. As we have just connected the disk to the computer, it will not appear yet, we have to mount it, click the "create" button, select the disk from the list and put a label on it, for example "FileSystem", click "OK" and OMV will format the disc to EXT4 (all data on the disc will be erased), it will take a while depending on the disc capacity, and then it will appear in the list. We click on the "Mount" button and we have the disk ready to use.
Step 2. Create the folder.
We create the folder where docker will be installed. We go to the "Access permissions" section and click on "Shared folders". We click the "Add" button and a window will open to create the shared folder, we give the folder a name, for example "docker", in this case the path will be "docker/" and We give read/write permissions to administrator and users, others without access. We click on "Save".
We must give access permissions to the created folder. We click on the "Privileges" tab and we make sure to give our user read / write permissions. Then we click the "ACL" tab and do the same, click on read / write permissions for our user, previously we must slide the button below to apply permissions to files and subfolders.
Once this is done we need to know the absolute path of this folder, for this in any of the columns if we hover the mouse over the title we see a tab that when we open it gives us the option to show more or fewer columns, we click on "absolute path" and a column will appear with the path of our folder, in my case
/srv/dev-disk-by-uuid-ff0c80a3-94 (... ...) 6b-69902cb2c5c4/docker
Note: Clicking on the row with the right button and then on "inspect" a window will appear where we can copy the name directly with the mouse, be careful not to touch anything, just copy and close that window.
Step 3. Set the installation path
We go to the "System" section and click on "OMV-Extras", and then on the "Docker" tab. In the "Dockers Storage" box we substitute the default path that is /var/lib/docker for ours, in my case /srv/dev-disk-by-uuid-ff0c80a3-94 (... ...) 6b-69902cb2c5c4/docker and we can install docker, for this we click on the "Docker" tab and then on the "install" option. Docker should be installed on the disk and folder that we have created. It will create a series of subfolders where the necessary packages will be installed.
When these subfolders have been created, we give ACL permissions to the created folder and its subfolders, repeating the process described in Step 2. In this way, all subfolders will be accessible. It is advised that users not add any ACL permissions unless they are absolutely know what they are for.
We already have docker installed on our dedicated disk.
Considerations to take into account:
- We can share this folder over the network with samba for example and see its content in a windows file explorer (be careful with this, only give permissions to the user who must see it for security reasons), effectively checking that docker is installed on this disk . It is not recommended for safety to leave it shared on the network but it can come in handy if we want to easily make a backup copy of some configuration, once seen we stop sharing it and the matter is fixed, so we will avoid modifying something that we should not touch.
- Every time we install an application in docker, it would be advisable to establish the path of its "config" folder, or the one it asks for, on the same disk, so that we will have everything in the same place. In this case, I did it on an SSD disk that, no matter how slow it is, will always go faster than the USB pendrive or the storage hard drives, thus giving faster to the applications installed in docker.
- The size of the disk will depend on the applications we want to install, for example Jellyfin uses this disk for temporary files when it is transcoding, also if you configure the library so that it does not save the metadata in the media folders, it will do so on this disk. In my case, I think that 60 GB is more than enough. Everyone must think about what applications to install and what capacity they need.
- If you don't want to occupy a SATA port just for this you can create this folder in your storage system depending on how you have it configured, in my case I have a SnapRaid matrix with UnionFS and Jellyfin did not work with the "config" folder in the matrix, so this solution worked for me. If your storage is a RAID with MDADM I suppose there would be no problem.
- You could make a single folder, for example "FileSistem" and then a subfolder "FileSystem/docker" and another subfolder "FileSystem/config" so that everything is within it in order to share it on the network all at the same time easily, but this limits later if you want to run rsync jobs to make backup copies by GUI, since it only supports jobs with shared folders, and you would have to go to that command line that some of us don't like. Each one to decide what interests him the most.
P.S.:
Please, I would appreciate that some wise man who abounds around here review this and correct me if I have said something atrocious, before someone copies me and does something wrong because of me, my intention is only to help beginners (... like me).
If posting such basic things is out of place in this forum for an administrator to delete the post, I have done it because I miss this type of information for basic things explained in detail (although they may seem obvious to those who have been using OMV for years), they would have been very good for me at the beginning and I think there will be people who will appreciate it, and they will not have to install OMV 3 or 4 times after breaking it as it happened to me.
If I have repeated something that is already on the forum, I apologize, sometimes it is difficult to find information and I have not found anything on this topic.
Translated into English by google, I do not accept any responsibility in this regard . I ask permission from here to publish the Spanish translation of these lines, I do not know if this is appropriate in this forum.