How to add a volume to an existing docker container?

  • I have the zoneminder docker image running under OMV5 just fine with 3 cameras. Except that the default storage mount is the same as OMV, which is not a very large drive. I have a drive to dedicate to ZM installed and set up on OMV and am able to access it both with NFS and SMB. I added it in the 'volumes' section of Portainer. But how the heck do I add it to the ZM container??

  • Don't add it to the Volumes section of Portainer. Add it to the ZM container by editing the container and deploying the container after editing.

    --
    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.

  • Don't add it to the Volumes section of Portainer. Add it to the ZM container by editing the container and deploying the container after editing.

    Thanks for replying. Under containers > zoneminder, I found the section for 'Volumes' which has 'zoneminder/data' and 'zoneminder' but there is no edit or add that I can find.

  • Click on the container name. Then click on the Duplicate / Edit button.

    --
    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.

  • Click on the container name. Then click on the Duplicate / Edit button.

    Thanks! I found all that and 'zonemindernas' appears to be added OK. I selected it from the menu of local volumes and after saving the volume details appear correct. Zoneminder in the revised container starts up, but then the ZM 'storage' option refuses to accept it. I put the path as copied from what Portainer says is "path in container' but upon saving ZM lists it as the original default location! It even renames it to 'Default'. I tried several times and now have 7 identical 'Default' storage locations, all identical. :/ Kinda weird! Adding it to the Volumes section will do all the necessary mounting behind the scenes for the container or is there some additional step for that I missed?

  • You might be better off using Bind mounts. Also it is difficult to help when you haven't provided any information about how you configured the container, not even the image name and where you got it.

    --
    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.

  • You might be better off using Bind mounts. Also it is difficult to help when you haven't provided any information about how you configured the container, not even the image name and where you got it.


    Oh, sorry, it's the one linked from Zoneminder's site as the somewhat official version. It is called dlandon/zoneminder.master:latest

    As for how I configured it, I just started it up as is. This is the first time I tried Docker so all I'm still fumbling about.


    Can you give me some direction for how to set up the bind type mount? I ssh'd to my OMV and poked around the filesystem but I can't figure out where it was put.

  • Oh, sorry, it's the one linked from Zoneminder's site as the somewhat official version. It is called dlandon/zoneminder.master:latest

    As for how I configured it, I just started it up as is. This is the first time I tried Docker so all I'm still fumbling about.


    Can you give me some direction for how to set up the bind type mount? I ssh'd to my OMV and poked around the filesystem but I can't figure out where it was put.

    Started it up as is doesn't say anything.


    The docker run command provided in the image documentation provides what you need to configure the container. You do need to select proper values for the various variables to fit your use case.

    --
    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.

  • Started it up as is doesn't say anything.


    The docker run command provided in the image documentation provides what you need to configure the container. You do need to select proper values for the various variables to fit your use case.

    Sorry, Zoneminder's website seems to be having issues and I can't get at those details. I just pasted in what they had as a default.

  • The docker run, docker compose, and docker create commands that you will see in the documentation pages of images are in almost every case examples, not working configurations that anyone and everyone can just run as is. You need to examine every line in such examples and decide for yourself if it can be used as is or must be modified to match your specific use case. To do this you need to have at least a basic understanding of docker and Linux principles. This knowledge is assumed, and this assumption is not mentioned anywhere.

    --
    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.

  • The docker run, docker compose, and docker create commands that you will see in the documentation pages of images are in almost every case examples, not working configurations that anyone and everyone can just run as is. You need to examine every line in such examples and decide for yourself if it can be used as is or must be modified to match your specific use case. To do this you need to have at least a basic understanding of docker and Linux principles. This knowledge is assumed, and this assumption is not mentioned anywhere.

    OK, I've gone over the example settings again and I think I see where to put the path. However, where has OMV 5 put it? So, using the OMV management page I've created a volume called 'zonemindernas' on a dedicated disk. However, it is not neatly under /mnt/ on the filesystem and the management page gives no hints as to where it might really be. "find zonemindernas -type d" did not locate it. I assume these are aliased somehow?

    thanks for the help and patience so far.

Jetzt mitmachen!

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