Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Docker on FreeNAS

Status
Not open for further replies.
Joined
Apr 2, 2016
Messages
193
I would like to have Tvheadend running in preferably a FreeNAS jail, but since tvheadend needs to use DevFS and kernel modules to get to the hardware (USB DVB-T tuner) ... jails won't let me do that for obvious security reasons.

I have seen Finch used for this job in the past, but that project seems to be deprecated now ..
Which leaves Docker, which is now available for FreeNAS.

The problem is I can't find any HOWTO's or other documentation on getting Docker working in FreeNAS.
There is documentation for setting it up in FreeBSD, but since that involves installing packages, which you can't do in the NAS RO filesystem .... and jails won't work, for the above reason, I am at a loss on how this will work for me ...

(FreeBSD instruction for reference is here: https://wiki.freebsd.org/Docker )

Anyone have experience with setting up Docker in FreeNAS?
 

m0nkey_

Dedicated Sage
Joined
Oct 27, 2015
Messages
2,732
Docker is not available on FreeNAS. That being said, I understand that it may be included in the next release of FreeNAS (v10).
 
Joined
Apr 2, 2016
Messages
193
Docker is not available on FreeNAS. That being said, I understand that it may be included in the next release of FreeNAS (v10).
Well that's interesting, because I can install it in a jail and I can execute docker commands ... guess I just installing the FreeBSD version then.
(Installed with pkg)
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Well that's interesting, because I can install it in a jail and I can execute docker commands ... guess I just installing the FreeBSD version then.
(Installed with pkg)
Even if it were available it would be a plugin which is just a jail. While 10 may include it(we will see), I have doubts that it will be in the base OS.
 
Joined
Apr 2, 2016
Messages
193
So, if it is not in the base OS, I can't achieve what I want. Why is this so hard?
Looks like my only option is to install the deprecated Finch and install tvheadend that way ..

The other alternative is to make the base OS writable and install packages, but I am guessing that that would break stuff ...
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
That would break lots of things. FreeNAS is an appliance. Don't try to bend it against its will if you value your data.

Why don't you just use a pi for this?
 
Joined
Apr 2, 2016
Messages
193
Because I don't want to use a Pi. I want all my "Server" applications in one place so I can manage it with less fuss and time ....
I have had Pi's and/or Odroid's doing this sort of job, and they are just another server to manage ..... I want to get away from that.

Bending it agains't it's will is exactly what plugins are for ... there is a demand for this sort of thing ....
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Plugins aren't for bending the OS against its will. Jails are a native part of FreeBSD.
 
Joined
Apr 2, 2016
Messages
193

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
It's included in a base FreeBSD install? Or it's just available as a package?
 
Joined
Apr 2, 2016
Messages
193
I conceed your point, As a package: "pkg install docker-freebsd"

Still, it would be great to see it in the base OS. Docker would be pretty useless if it can't load kernel modules, or run DevFS. (like Finch can)

If not in the base OS, then I have to by-pass FreeNAS completely with Finch ..
 
Last edited:
Joined
Apr 2, 2016
Messages
193
So what I am going to do is this:

1. Ignore both Docker and Finch for now.
2. Setup tvheadend in a jail -- done
3. Make base OS writable and copy over cuse4bsd.ko kernel modules over to base OS from install in the jail. Make load on boot. -- done
4. Copy over webcamd executable to base OS. Make run on boot -- todo
5. Expose dvb devfs nodes to the jail ... easy part ..
6. Make base OS read-only again.

I know it's a hack, but it has minimal impact on the base OS and gets' all my "servers" in one place, and I still have the security of the jail.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
So what I am going to do is this:

1. Ignore both Docker and Finch for now.
2. Setup tvheadend in a jail -- done
3. Make base OS writable and copy over cuse4bsd.ko kernel modules over to base OS from install in the jail. Make load on boot. -- done
4. Copy over webcamd executable to base OS. Make run on boot -- todo
5. Expose dvb devfs nodes to the jail ... easy part ..
6. Make base OS read-only again.

I know it's a hack, but it has minimal impact on the base OS and gets' all my "servers" in one place, and I still have the security of the jail.
Until you perform an update....
 
Joined
Apr 2, 2016
Messages
193
So true .... wish FreeNAS made this sort of thing easier ...
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,581
So true .... wish FreeNAS made this sort of thing easier ...
You mean mucking with the base OS of a storage appliance to make it do things that it was never designed to do? I don't agree. It's difficult enough for some users just to get datasets, shares and permissions set up correctly let alone trying someones OS hack that they read about on the interwebs.
 
Joined
Apr 2, 2016
Messages
193
That' ok Jailer, I don't need you to agree, .... I am totally entitled to bend FreeNAS to do what I want, it's my box, not yours. I am not suggesting others do the same as me, I am just showing how I solved this problem .... for ME.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,862
I am totally entitled to bend FreeNAS to do what I want, it's my box, not yours. I am not suggesting others do the same as me, I am just showing how I solved this problem .... for ME.
Yes, you are certainly able to bend it to your will. I just hope you'll stick around to help out with the downstream maintenance effects down the road.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,581
That' ok Jailer, I don't need you to agree, .... I am totally entitled to bend FreeNAS to do what I want, it's my box, not yours. I am not suggesting others do the same as me, I am just showing how I solved this problem .... for ME.
And I think that's awesome that you can.

I just wouldn't want it to be any easier for someone without the necessary skills to do, this forum would be a mess if it were.
 

tofagerl

Member
Joined
Aug 26, 2013
Messages
118
Just out of interest, would what he describes be possible in FreeNAS 10? Run images in docker as if they were complete machines with full root like jails, but without all the limitations of jails?
In other words, could I run a docker container on FreeNAS the same way I can run it on my mac right now?
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Just out of interest, would what he describes be possible in FreeNAS 10? Run images in docker as if they were complete machines with full root like jails, but without all the limitations of jails?
In other words, could I run a docker container on FreeNAS the same way I can run it on my mac right now?
FreeNAS 10 is still early alpha, so what will be in the final product is unknown at this time.
 
Status
Not open for further replies.
Top