Docker versus iocage jails

Status
Not open for further replies.

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Perhaps it is a bit premature to ask this question, but what is the big advantage to running Docker versus iocage jails? I've seen a lot of discussion about Docker, often in reference to setting up something like Plex, and it looks like getting everything up and running is quite complicated. Is there some killer app for which a FreeBSD version is not available?

I spent some time learning the basics of iocage, and I am certainly not an expert - but I can get an iocage jail up and running from the CLI in about 10-20 minutes. Mounting datasets is easy. Installing and updating applications from the package repositories is also easy.

What can I do in Docker that can't be done in a jail?
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
What can I do in Docker that can't be done in a jail?
Nothing. Most, if not all applications in Docker can work within a Jail.

Jails have the advantage of being able to make use of the underlying hardware, where as Docker on FreeNAS must be run in a Virtual Machine.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Nothing. Most, if not all applications in Docker can work within a Jail.

Jails have the advantage of being able to make use of the underlying hardware, where as Docker on FreeNAS must be run in a Virtual Machine.
Thanks. I presume the big advantage would come from an application that is available as a Docker image but does not have a FreeBSD version. I would assume that, any application available for FreeBSD would be better if put in a jail. This is why I decided to learn something about the new jail system.
 

picklefish

Explorer
Joined
Mar 13, 2016
Messages
62
One advantage of docker is the tens of thousands of pre-built/configured docker containers out there. You drop the docker container in and you're ready to go, very little setup.
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
One advantage of docker is the tens of thousands of pre-built/configured docker containers out there. You drop the docker container in and you're ready to go, very little setup.
On the flip side, there is tens of thousands of packages and ports to choose from.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
One advantage of docker is the tens of thousands of pre-built/configured docker containers out there. You drop the docker container in and you're ready to go, very little setup.
Of course. I understand the potential. However, Docker is a Linux container which means that on FreeBSD one must create what is, in effect, a Linux VM. I would imagine that, for any application where there is a FreeBSD version - it would be more efficient to use a jail.

What applications are available as Docker Images that I would want to run on FreeNAS? This is something that I will investigate.
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
Of course. I understand the potential. However, Docker is a Linux container which means that on FreeBSD one must create what is, in effect, a Linux VM. I would imagine that, for any application where there is a FreeBSD version - it would be more efficient to use a jail.

What applications are available as Docker Images that I would want to run on FreeNAS? This is something that I will investigate.
Considering in order to get Docker running on FreeNAS, you're effectively running a VM inside of a VM at that stage. You'll be better off standing up a Linux machine on physical hardware and running Docker off that. FreeNAS is a less than ideal platform for it.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Docker itself isn't really a VM, though. It's closer to a crappy version of jails with a neat management layer.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Considering in order to get Docker running on FreeNAS, you're effectively running a VM inside of a VM at that stage. You'll be better off standing up a Linux machine on physical hardware and running Docker off that. FreeNAS is a less than ideal platform for it.
We're developing some software at work that will run in Docker, but our OS of choice is Centos. I suspect our customers will run Centos or Red Hat. When I ask about FreeBSD, the developers ask "Why would you want to run Docker on FreeBSD?" Good question. Obviously, some killer app that was not ported to FreeBSD would be the obvious answer.

There seems to be a lot of interest in Docker... so what killer app is out there that one would use with FreeNAS?
 

Xyrgh

Explorer
Joined
Apr 11, 2016
Messages
69
I think the only issue that a lot of people have with jails is the storage aspect. Adding storage doesn't create permissions inside the jail, and installing is via the CLI. The last tiny issue is that some stuff just isn't available as a port.

If there was some sort of management layer for jails whereby you could clone users from the main OS to the jails transparently where permissions remain synced with the main OS, plus add in some sort of (searchable?) interface for packages from freshports, I think it would remove 90% of problems beginners have with jails. In saying that, I understand the development time required to do this.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
I think the killer app is docker itself.

Docker containers are essentially the Linux equivalent of jails.

So you have the overhead of a vm but not a nested vm.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
I think the only issue that a lot of people have with jails is the storage aspect. Adding storage doesn't create permissions inside the jail, and installing is via the CLI. The last tiny issue is that some stuff just isn't available as a port.

If there was some sort of management layer for jails whereby you could clone users from the main OS to the jails transparently where permissions remain synced with the main OS, plus add in some sort of (searchable?) interface for packages from freshports, I think it would remove 90% of problems beginners have with jails. In saying that, I understand the development time required to do this.
I don't see beginners creating jails from scratch and I don't see them using Docker either. That's what plugins are for. And yes, with iocage there is a searchable interface for packages - it's really quite straightforward. Once integration with the GUI is complete, I think folks will like iocage.

Docker has its merits as well. For a Linux user it makes sense. I just don't see a lot of benefit for a FreeNAS user - unless there is some important application for which there is a Linux version but no FreeBSD version.
 

Xyrgh

Explorer
Joined
Apr 11, 2016
Messages
69
I don't see beginners creating jails from scratch and I don't see them using Docker either. That's what plugins are for. And yes, with iocage there is a searchable interface for packages - it's really quite straightforward. Once integration with the GUI is complete, I think folks will like iocage.

I have zero experience with iocage, but that sounds fantastic. That's basically all I'd ask for, and it's going to be implemented. Neat!
 
Status
Not open for further replies.
Top