I have a nas (synology) and a mini pc(will install linux + docker) then I would like to use my nas drive as the storage (like storing photos) then use the docker on my linux machine and mount nas drive volume. But this should work when I manage on my linux machine.

It will be easier to manage on my nas then use my linux machine as a node/worker for running containers. So if you have any suggestions for this concept please let me know

  • jkirkcaldy@alien.topB
    link
    fedilink
    English
    arrow-up
    2
    ·
    10 months ago

    I think you have a fundamental misunderstanding of what you are trying to achieve. And are over complicating things which is confusing everyone.

    It would help greatly if you could give some indication of what containers you actually want to use.

    From the sounds of it you want a file server which is your nas. Then you want to run an application in a docker container on your Linux machine.

    Using Plex as an example, you would mount your Plex directories on your Linux server via NFS, then start the Plex container pointing at the mounted directory on the Linux server.

    Nothing would run on your nas apart from the nfs file server.

    The image you linked looks a bit more like a distributed worker. I use something similar where one server runs the core services and then I run specific workers on multiple other machines to distribute and increase the processing power. I don’t believe this is what you want to do as if it was, you would probably know it.

  • peteyhasnoshoes@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    You may be able to use swarm mode or k8s with your NAS as a master and other box as as a worker, but really theres very little point. As others have said, exporting volumes from your NAS via NFS and managing the worker using portainer or ssh to manage the worker directly might be better.

    This kind of situation, where you have heterogeneous management systems with cross-cutting concerns is a great fit for Ansible - your playbook could provision the NFS volumes form the NAS and push the compose files to the worker at the same time, saving you from having to log in on both

    • cyl3el2cleal2@alien.topOPB
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      I will try swarm mode. K8S is too heavy. Portainer is a great tool but I need to ssh for mounting drive every time I want to use NFS.

      • heehoX@alien.topB
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

        You don’t have to SSH everytime. You can just add the NFS share to your fstab and it will automatically mount when you boot your machine.

  • Interesting_Ad_5676@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    Do you would like to use Linux system as docker host and you want to have storage exposed by NAS for this docker host ?

    If that is the intent of your question, yes it can be done.

    Expose nas storage over nfs. Mount the nfs in Linux. Refer the mount point directory as docker storage in docker-compose file. That’s it. No big fuss. You can even soft link /var/docker directory to your nfs share, if required.