Guide: Using the new docker plugin

    • Offizieller Beitrag

    This is for those of you struggling with the new docker plugin. It should hopefully help you transition to the new plugin, with the eventual goal of transitioning away from Portainer (the idea of the new plugin is to keep everything contained in the OMV webUI, and make support more consistent).


    If you are transitioning from an install with the old plugin, verify where your containers are stored on your system. As root or sudo, execute the following command


    Code
    docker info | grep Root

    and record the path in the output into a text file to refer to later.


    If you have a brand new install, then just proceed.


    Once you have that info, the procedure is relatively simple.


    1. Log in to OMV and go to Shared Folders.

    2. Create a folder called "compose". If this is a new install, create a folder called "containers". This really needs to be on a larger data drive, as these folders can get large. If you are setting up for the first time, you'll also need the absolute path to this folder (click the 4 squares in the upper right, put a check next to absolute path). Click the copy icon at the end of this path and just save it in a text file for now.

    3. In the webUI, Go to System/omv-extras

    4. Click Enable Docker Repo (if it's not already)

    5. Save/Apply

    6. Click apt-clean

    7. Once apt finishes, go to System/Plugins

    8. Do a search for "compose" and install the openmediavault-compose plugin.

    9. Now with the installation of the compose plugin, go to Services/Compose/Settings.

    10. In the drop down box at the top, set that to the compose folder we created in Step 2.

    11. In the "docker storage" path... If it is anything other than the path you recorded earlier, paste your path there. If it already has your path there, then there's no need to make a change. If it's a new install, paste the path you recorded earlier to the "containers" folder we created.

    12. Click Save

    13. CLICK RESTART DOCKER (this is important)


    After docker starts and says it is installed and running.. If you had a previous installation, all of your containers, etc.. should be up and running as they always were and you can continue to use docker the way you always have.


    If this is a new installation, you can now start using the "files" section to for docker-compose.


    The idea is to transition your stacks, etc.. from Portainer, to the new plugin. I'll go over how I did this in a little bit, but at this point, your system should be up and running like nothing happened.

  • KM0201

    Hat das Thema freigeschaltet.
  • KM0201

    Hat den Titel des Themas von „Guide: Transitioning to the new docker plugin“ zu „Guide: Using the new docker plugin“ geändert.
    • Offizieller Beitrag

    Part 2: Importing your containers to the new Compose plugin


    Assuming youv'e completed the first part of this, you should have full access to your docker containers via Portainer, just like you always have. As stated, the goal is to get everything into the webUI.


    If you've completed the first steps and assuming you have some containers running, you'll note that they do not show in /Services/Compose/Containers. In the example below, I have 4 containers (nextcloud, nextclouddb, portainer, and jellyfin)


    42.png


    If I go to the Containers section under the new plugin, it shows I have zero containers. This is because the containers have to be configured in the plugin, to show.


    43.png


    Now assuming like most users, you've made pretty heavy use of stacks... Stacks are just docker-compose files. So open a stack (I'm going to use Nextcloud in this example) and click the Editor tab and copy the stack. For the sake of being extra cautious, paste it into a blank text file on your desktop.


    Now click on Stacks, and delete the nextcloud stack (since we just copied it into the text file). You'll note when you delete the stack, your nextcloud and nextclouddb containers will also be deleted. The containers will be deleted.. not the data. As long as you've mapped your volumes properly in the volumes section of your containers, you'll suffer no ill effects following this. If you're unsure here, just ask some of the more experienced posters here.


    Now, with the stack deleted, in the OMV webUI, go to Services/Compose/Files

    Click the + sign at the top

    Name the file (nextcloud in this case)

    If you want to add a description of the file, do so.

    Paste your Stack into the top box.

    Click Save/Apply

    Once the file is saved, click your new file, then click the "up" arrow in the toolbar.

    You'll see it reinstalling your container (Nextcloud in this case). This won't take very long as all images, volumes, etc. are still in tact.


    Now if I go to Services/Compose/Containers, I now see my two nextcloud containers in the new interface. Once the containers have finished starting, I'll now be able to log in to NC and use it just like I always did, all of my files, usernames, etc. remain.


    44.png


    If I go back to Portainer, and click on Stacks, you'll now see I have "Limited" control over Nextcloud now, where Jellyfin is still "total" as I've not moved it to the webUI.


    45.png


    So now, I'll just repeat this process, and move Jellyfin. Now portainer has "limited" access to my Jellyfin compose, and I can see it in the containers section of OMV


    46.png

    Now, one of the big advantages of stacks, is being able to easily modify and redeploy them. Now ryecoaaron and his wisdom, this plugin is just as easy. So right now, I only have a "Movies" directory assigned to Jellyfin. Lets say I want to Add a "TV" directory...


    Go to Services/Compose/Files, and click on my Jellyfin file, and click the Edit button at the top

    Scroll down to the volumes section, and add my "tv" volume (line 14 in the below pic), just like I would if I was updating a stack in Portainer.

    47.png


    Save and Apply

    Click the jellyfin file and click the "up" arrow. This will redeploy jellyfin with your updates. Essentially, just like you were updating a Portainer stack

    Now just go to jellyfin, and add your new library like normal.


    Now, if you go to the "compose" folder we created earlier... You'll see all of your "files" are backed up there. So make this folder part of your backup process so in the event of a serious failure.. You have all your compose files saved and they will be pretty easy to redeploy.


    Code
    root@omv6-test:~# cd /srv/dev-disk-by-uuid-de4d3cf0-f186-4a01-9c75-d518c66176c5/compose/
    root@omv6-test:/srv/dev-disk-by-uuid-de4d3cf0-f186-4a01-9c75-d518c66176c5/compose# ls
    jellyfin  nextcloud
    root@omv6-test:/srv/dev-disk-by-uuid-de4d3cf0-f186-4a01-9c75-d518c66176c5/compose# cd jellyfin/
    root@omv6-test:/srv/dev-disk-by-uuid-de4d3cf0-f186-4a01-9c75-d518c66176c5/compose/jellyfin# ls
    jellyfin.env  jellyfin.yml
    root@omv6-test:/srv/dev-disk-by-uuid-de4d3cf0-f186-4a01-9c75-d518c66176c5/compose/jellyfin# 

    Now at this point, if you want to keep Portainer around as a security blanket until you adapt to the new plugin.. You can keep it. Obviously you can't edit your stacks anymore, but you can still use it (personally I still have it as I'm still adapting to the plugin as well). Like I said earlier, the eventual goal, will be to dump Portainer, and use the plugin only.


    Any questions, post in one of the 50 threads on this subject and I'm sure someone can help. :)

Jetzt mitmachen!

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