How to install "docker" in a folder of a dedicated disk with clicks

    • Offizieller Beitrag

    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 ... 8o)


    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.

    • Offizieller Beitrag

    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.

    It all looks good except for that one little bit. It is advised that users not add any ACL permissions unless they are absolutely know what they are for. It is just a caution because many new to OMV add the ACL's and don't really need to.


    Other than that I think this is a good description (in spite of Google translate) of changing the file path to Docker Storage. You should post it in Spanish. I'm sure it would be helpful. In the Guides section there is a template and guidelines for creating a guide here, which then has to be approved by a moderator. Good luck and thank you.

    • Offizieller Beitrag

    Thank you very much for your correction. :thumbup::thumbup: I will follow your advice and adapt it to the script and guidelines to publish it in guides with the Spanish translation. I edit it and add the ACL permissions warning.

    • Offizieller Beitrag

    This guide has a problem.

    Doing this in a clean installation did not work for me the Jellyfin repository. If someone knows what is missing ... Otherwise this does not work.

    • Offizieller Beitrag

    The extensions do not appear in the corresponding tab of the Jellyfin configuration. I guess Jellyfin can't connect to repository ... or can't save to created folder ...

    I installed docker again in the default path and it worked fine.

    • Offizieller Beitrag

    I installed it by adding a "stack" in portainer with this code:


    • Offizieller Beitrag

    There a few things that need changing within that stack;


    1) Create a user on omv that will use that container, so obvious one would be Jellyfin, you should not use 998 that's the admin user


    2) I'm assuming you have a share folder named /config on this drive -> /srv/dev-disk-by-uuid-cedf4fc3-95ca-4de4-b469-4636a695b629 if that's a drive within the pool that's fine


    3) The path within the container, that's the part after : for fotos, musica etc those should be /data/fotos, /data/musica etc. Because when you add a library to Jellyfin from it's WebUI you will browse to /data/fotos for the foto library and /data/musica for the music library

    • Offizieller Beitrag

    Thanks geaves.

    1) Create a user on omv that will use that container, so obvious one would be Jellyfin, you should not use 998 that's the admin user

    The user jellyfin in which groups do I put it? "users, docker" is ok?

    • Offizieller Beitrag

    provided the Jellyfin user has read/write access it should work.

    Your Jellyfin (or whatever name you use) user gets those read/write privileges in the GUI from the Privileges tab either in Users or Shared Folders. Select the user (or folder) and then select Privileges and check the box next to read/write.

    • Offizieller Beitrag

    Stack corrections are done. Thanks to both of you.


    I can no longer reproduce the problem I raised because it occurred with a clean install. I'm worried about leaving this guide here and someone following it and their system doesn't work properly.


    Do I delete the guide??

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!