OMV7 Compose Container Access

  • I recently moved from my old OVM 5.6.26-1 NAS running >10 years now to a new more powerful machine. Since I can run both systems parallel, moving data and configurations is quite easy. Running Docker+Portainer on the old machine, I have a little struggle with certein settings through Compose plugin:


    1. I set up a custum bridged network within Compose, so that the containers can communicate with eachother (nextcould+swag for example). How do I set up the usage of the network within the compose files? My bridge is 'docker-net' with IP range 192.168.100.0


    I tried to use this

    networks:

    docker-net:

    ipv4_address: 192.168.100.2

    networks:

    docker-net:

    external: true

    within the compose files. Any suggestions how to do it right?


    2. With Portainer in the old machine, I used the CLI option to work within the containers, for example to edit their configurations. How do I do this with Compose? My idea was to edit the configuration files from the host within the volumes. Is there a more convientient way to do it?


    I set up Docker with user docker:docker, all running on the SSD-pool.


    My machine:


    HPE ProLiant Microserver Gen10 Plus - Xeon E-2224 - 64 GB ECC - QM2-2P10G1TB - 2x WD Red SN700 2TB zfs mirror - 4x Toshiba MG10ACA 20 TB zfs Z-R2


    Thank you in advance for your support and suggestions!

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett


    NAS Build: HPE ProLiant Microserver Gen10 Plus Xeon 2224, 64GB ECC, QM2-2P10G1TB, 2x WD Red SN700 2TB ZFS Mirror, 4x Toshiba MG10ACA 20 TB ZFS RaidZ-2, OMV7.X

    Edited once, last by riff-raff ().

    • Official Post

    How do I set up the usage of the network within the compose files?

    Your example tells docker compose to create the network and use it. You do not want to create the network in every compose file. Create the network from the Networks tab in the Compose plugin (or use the command line). Then you do want to tell each compose file to use the external network.


    Code
    networks:
      SomeNetworkName:
        external: true


    With Portainer in the old machine, I used the CLI option to work within the containers, for example to edit their configurations. How do I do this with Compose? My idea was to edit the configuration files from the host within the volumes. Is there a more convientient way to do it?

    If you are editing files in the container, you are doing it wrong. If those files aren't exposed in a persistent volume, you will lose changes when you restart the container. If they are exposed in a persistent volume, you should edit them on the host.


    I can't add a terminal to the plugin but you can still get a list of containers with docker container ls and you can enter the container with something like docker exec -it container_name sh

    omv 8.0-12 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.2 | compose 8.0.5 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.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!

  • Thank you for your support, that post clears pretty much all of my uncertenties.


    I modify within the containers typicially only the configs, which are im most cases mapped to an external volume anyways, so I can access them from the host.


    I'll try to set the network as recommended and give some feedback afterwards. Can I define a static IP for the container using:


    networks:

    docker-net:

    ipv4_address: 192.168.100.2

    external: true


    Kind regards

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett


    NAS Build: HPE ProLiant Microserver Gen10 Plus Xeon 2224, 64GB ECC, QM2-2P10G1TB, 2x WD Red SN700 2TB ZFS Mirror, 4x Toshiba MG10ACA 20 TB ZFS RaidZ-2, OMV7.X

    Edited once, last by riff-raff ().

    • Official Post

    Can I define a static IP for the container using:


    networks:

    docker-net:

    ipv4_address: 192.168.100.2

    external: true

    Not like that. The IP address has to be defined in the Services section.


    chatgpt is very good at helping with this stuff.

    omv 8.0-12 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.2 | compose 8.0.5 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.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!

  • Isn't this the same as I posted initially, only not so well formatted? (I'll have to check propper quoting)


    Sometimes i think I'm getting old ... ChatGPT was obvious, missed on asking "that guy". But human help is something to be more greteful for.


    Edit:

    ChatGPT did the formatting for me now :D

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett


    NAS Build: HPE ProLiant Microserver Gen10 Plus Xeon 2224, 64GB ECC, QM2-2P10G1TB, 2x WD Red SN700 2TB ZFS Mirror, 4x Toshiba MG10ACA 20 TB ZFS RaidZ-2, OMV7.X

    Edited once, last by riff-raff ().

    • Official Post

    Isn't this the same as I posted initially, only not so well formatted? (

    Your post had the ip address element in the network section. Mine has it in the services section. It will only work with the ip address in the services section.

    omv 8.0-12 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.2 | compose 8.0.5 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.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!

  • riff-raff

    Added the Label resolved

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!