Docker storage location

  • I successfully installer OMV5 with docker support and NGINX(even with multiple sites on a shared USB drive) and DUPLICATI running.
    The containers are located on the pi drive.


    I want to change the location of the containers to a USB drive which is connected to OMV.
    The location will be something like: /sharedfolder/DISK1/docker


    Unfortunately it will not accept this change(sharedfolders), somebody to the rescue?


    JHod

    • Offizieller Beitrag

    Are the containers moved automatically or do I have to do this by hand?

    Move by hand.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    first stop docker i presume?

    Yes

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I stopped Docker svc , moved the folder and files to the new location /srv/dev-disk-by-label-<name>/docker


    Started docker svc but it still points to the original location and makes new empty folders...??


    JHod

  • Yes I did but it keep using the old setting

    Examine the file /etc/docker/daemon.json is the correct path there?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Is the Docker storage path you are entering a valid location? Are you pressing the Install docker button after changing the Docker storage path?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Offizieller Beitrag

    Is the Docker storage path you are entering a valid location? Are you pressing the Install docker button after changing the Docker storage path?

    I'm wondering if that is where part of the confusion is on this issue? Folks are putting the new path in, and are hitting "Save" at the top. If I'm not mistaken (from what I've seen of this on reddit and what you posted seems to suggest it)... Save will only have an effect on the sources list if you've made adjustments to the repositories on that same page, not on the docker location.... and if you change the docker location, you actually need to hit install docker again, to make it actually change. As I've mentioned I just used symbolic links to get around this issue, so it wasn't a problem I experienced. I can see why this is leading to a lot of confusion though. Maybe I'm misunderstanding


    Assuming that is the issue and at the risk of adding more work to ryecoaaron.. maybe those two pages should be on separate tabs under OMV-extras? Have a "sources" tab and a "docker" tab. On the docker tab, "save" would actually initiate the install docker script again when the path is updated. On the sources tab, it would simply operate as it does

    • Offizieller Beitrag

    OK, so I just confirmed this myself...


    On my virtual install, my docker path was set to srv/dev-disk-by-id-ata-VBOX_HARDDISK_VBc29e9cae-86cec03b-part1/Containers and all was working fine (I didn't use s-links in my virtual machine)...


    1. I stopped docker at the command line
    2. Changed the path in the webui back to /var/lib/docker and hit save
    3. Restarted docker in the command line.
    4. Checked the daemon.json, and it's still showing the old "/srv" path.
    5. Hit the "Install Docker" button, and checked the daemon.json again, and it's now showing /var/lib/docker again
    6. I then repeated the process putting my old "/srv/" location back in the container location in the webUI. This time instead of restating docker at the command line, I clicked the "Install" button and docker started normally w/ all my old containers, etc.


    Now I see why this is confusing so many people.


    I see 3 easy solutions.


    1. On the "note" under the path, after changing the path, Indicate you need to click Install Docker
    2. Add a "restart docker" button next to the install docker button, and indicate under the path to click restart docker if the path is changed.
    3. Moving docker to another tab under omv-extras as I suggested above, where the "save" button would update the path.

    • Offizieller Beitrag

    I see 3 easy solutions.


    1. On the "note" under the path, after changing the path, Indicate you need to click Install Docker
    2. Add a "restart docker" button next to the install docker button, and indicate under the path to click restart docker if the path is changed.
    3. Moving docker to another tab under omv-extras as I suggested above, where the "save" button would update the path.

    The docker stuff doesn't have to be on its own tab to make it update the path when clicking save but maybe I will make docker and cockpit tabs.

    • Offizieller Beitrag

    I don't see an issue with that, but I'm not sure how it would solve this problem, as this seems more directly related to docker than portainer or cockpit. I personally think the setup that you have now, is good... but I just see where all this confusion is coming from now.


    Another easy solution (and honestly, maybe the most appropriate) the Save button at the top could simply update the sources list and update the docker path in daemon.json. Only question, is would this result in the "save" button installing docker if the user hasn't installed it already, if they were just adding/removing a repository?


    If they change the path after initially installing to /var/lib/docker.. common sense will likely tell them to click Save at the top (which I think a vast majority of folks are doing).


    Just my thinking.

    • Offizieller Beitrag

    I don't see an issue with that, but I'm not sure how it would solve this problem, as this seems more directly related to docker than portainer or cockpit. I personally think the setup that you have now, is good... but I just see where all this confusion is coming from now.

    Just about done with the changes to create the Docker and Cockpit tabs. Now, the save button on the Docker tab will re-write the daemon.json file and restart docker (if necessary) now.

    • Offizieller Beitrag

    Just about done with the changes to create the Docker and Cockpit tabs. Now, the save button on the Docker tab will re-write the daemon.json file and restart docker (if necessary) now.

    I think that's the best approach. I misread what you typed earlier and thought you were putting portainer and cockpit on different tabs.


    I don't generally question your wisdom on laying this stuff out but it did make me think, 'WTF'... :). Hopefully this will alleviate some of the confusion this has caused.

  • I can conform this, i used the save button and not the install docker option.
    It is a little bit confusing.
    After I editted the location in de json file it worked, i had to install portainer again.

    • Offizieller Beitrag

    When I created it, I made the assumption that most people would only set it once before installing docker.

Jetzt mitmachen!

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