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

2 points

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.

permalink
report
reply
1 point

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

permalink
report
reply
1 point

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.

permalink
report
parent
reply
1 point

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.

permalink
report
parent
reply
1 point

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.

permalink
report
reply

Self-Hosted Main

!main@selfhosted.forum

Create post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

For Example

  • Service: Dropbox - Alternative: Nextcloud
  • Service: Google Reader - Alternative: Tiny Tiny RSS
  • Service: Blogger - Alternative: WordPress

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

Community stats

  • 17

    Monthly active users

  • 1.8K

    Posts

  • 11K

    Comments

Community moderators