What's new

Help with Docker / Container Station

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Loxion

New Around Here
Hi All

I am new here and fairly new to the QNAP NAS, and exploring what I can do with it.

I have playing about with Container station and Docker containers obtained directly through it. Most things are going well and I am getting my head around various elements, but one think I am struggling with is how I get a Docker Container to access (Read and/or Write) access to a Share on the NAS?

I currently have a Linux VM running Radarr, Ombi, BT client etc and that all works fine, however I would rather use Docker as that way is likely to be less resource intensive. However, I am struggling to get the Docker containers to even see an existing Share on the NAS.

Can anyone give me a really simple guide or some basic help to point me in the right direction. I can find lots of info on Google but am struggling to get my head around it. I only have very basic knowledge of Linux and can often do most things with the help of Google, but I am getting nowhere with this.

Any help, information or pointer would be very much appreciated.

I am using a QNAP TS251D with 16Gb RAM, primarily running a Plex media server and a Linux Mint VM. I have Sonarr currently running via an older QPKG through the QNAP Club Store but it is out dated and not maintained as far as I can tell.
 
Another day searching and sorted it out. Just one little key point that I kept missing until I found some specific info and guidance through QNAP!

I was missing the network and other config details when pulling the container through Container station, annoyed with myself as it was so obvious and I just kept missing it
 
Care to expand and share your 'breakthrough' for others too? :)
 
Sure.

This was done on a TS-251D on QTS 5

So, from the info I had found there are a few things that were highlighted, I haven;t tested if they are all needed or just some but I implemented them all.

1) Create a new user on the QNAP (or you could use an existing user, doesn't matter) and ensure that user has access to the required folders. I was accessing public folders but created a new user anyway. If you want specific folders ensure you setup the shares and give the specific users the correct access (read, write etc) to that share.

2) When done, SSH into the QNAP to get the UID and GID for that particular user, the the command 'id {username}', replace {username} with the account name you created.
This will give you an output something like 'uid=1003(John) gid=100(everyone) groups=100(everyone),1000(John)' where John is your account name, make note of the two for John

3) Go into Container Station, under the Create option search for the application you want .. assuming its available, when you have it Click Install and select the latest version. This will take you to the Create Container window.

4) Select Advanced Settings at the bottom of the window, you need to make a few changes in here:
i) Under the Environment area input two new entries:
- PUID 1003 (as per the SSH output above)
- GPID 1000 (as per the SSH output above)
ii) Under Network I changed mine from NAT to Host. This does put up a warning about conflicts but I have had no issues at the moment.
iii) Under the Shared Folder section you need to Add the 'Volume from Host' and ' Mount Point'. This is the second section in that area. If you have setup the account etc correctly when you click in the Volume from Host box you should get a folder view of the areas the account has access to on the NAS itself, select the desired folder. In the Mount Point just name a folder, something like /NAS. It doesn't need to exist as it will be created when you run the container.

5) Save all that and Create the container

6) Job Done, the app running in the container should have access to the NFS Share on the NAS through the defined Mount Point folder.
 
I currently have a Linux VM running Radarr, Ombi, BT client etc and that all works fine, however I would rather use Docker as that way is likely to be less resource intensive.

Docker is no more or less intensive on machine resources...

It's more along the line of packaging an application and it's dependencies in a consistent way to ensure that it can be reproduced at scale (think cloud apps, where thousands of machines are running the same apps/code).

For a small machine like a personal NAS, it's probably overkill for most folks...
 
I have a problem running the VM side and a different problem running the docker side.

Everything works in a VM apart from I can't get Sonarr to see the nfs shared folder on the NAS, only Sonarr ... everything else works.

If I run it all in Docker everything can see each other and the shared folder, but I can't get the Docker container(s) to run through the VPN I have setup on the NAS unless I set the VPN as the default gateway. I don't want to do that as I have other things running that work far better without a VPN.

Next option I am looking at is a second PCIe network card in the NAS so I can physically separate the default gateway and VPN onto different interfaces!
 
Last edited:
Can anyone point me in the direction of a simple guide or information on how to setup this up? Everything I Google gives me information about setting up a VPN Server on the NAS (which is not what I am trying to do).

In essence I have two physical adapters on the NAS, I want to use one as the default gateway (thats easy) and already setup. I then what the all traffic on the second adapter to route through an existing OVPN client profile, and then get all Docker containers to route through that 2nd Adapter / OVPN client profile.

I am very new to the networking side but happy to learn. Unfortunately all the info I am finding doesn't seem to relate to a setup as above. I can't imagine I am trying to do something particularly unusual?

Any help, info or guidance very much appreciated.
 
Can anyone point me in the direction of a simple guide or information on how to setup this up? Everything I Google gives me information about setting up a VPN Server on the NAS (which is not what I am trying to do).

Start here...


once you sort out VirtualSwitch configs - docker images have their own interfaces, and they are different from the VM's or physical interfaces - you need to tie them together so that they can talk to each other.

VSwitch is a bit alien at first glance, but once one has a good understanding of it, it is quite powerful...

It's not something that can be a cut-paste item on a web forum, as it is complex enough that one person's solution may break someone else.
 
Thanks for the info.

I wasn't after a simple cut/paste set of instructions and am more than happy to research and learn. Unfortunately, I didn't really have enough info/knowledge to even know where to start looking :)

Will definitely get a better understanding of the virtual switch.
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top