Jail or Docker container for application delivery?

If I had a choice of delivering an application through a Jail or through Docker, I would choose a

  • Jail

    Votes: 6 54.5%
  • Docker container

    Votes: 5 45.5%

  • Total voters
    11
  • Poll closed .
Joined
Jan 4, 2014
Messages
1,644
I presently use two ways to deliver applications within FreeNAS. This is modelled below. In simple terms, this is how I think of application delivery within FreeNAS.

screenshot.418.png


Understanding the Model

In this 'spreadsheet' model, there are three rows and three columns. For rows, there's Application, Mount Point and Data. For columns, there's Picture, Jail and Docker.

In the Picture column, there's an Application (top row) and it has some Data (bottom row) associated with it. There's something almost invisible in the middle, the Mount Point, which doesn't really feature in the Picture column (e.g. your mother might understand Applications and Data, but try explaining Mount Points to her!).

If you have a look at the Data row, my data is always stored within FreeNAS. FreeNAS is designed with data storage in mind and has exceptional tools for managing data.

If you have a look at the Application row though, I've described two popular ways for delivering applications within FreeNAS; through Jails and Docker containers. (There's also VMs for delivering applications, but that's not a focal point for this discussion).

Using the Jail approach for delivering applications (the Jail column), the Application resides in a Jail, but it's preferable for the Application's Data to reside outside the Jail within FreeNAS where it can be better managed. What connects the Application in the jail to the Data outside the jail is a Mount Point.

Now the Docker column is interesting. There are a couple of 'glue' elements that join together adjacent elements; Docker links the Docker container to the VM host, while Bhyve links the VM host to FreeNAS.

Using the Docker approach for delivering applications (consider the Docker column), the Application resides in a Docker container, while its Data resides in FreeNAS. What connects the Application to the Data is a Mount Point provided by the VM Host.

The Application Delivery Dilemma

Now the dilemma I'm facing is 'Which mechanism should I use to deliver applications if I have a choice - Jail or Docker?'. In some cases, the decision is made for me - the application is only available on FreeBSD and not Linux, or vice versa. An example is OnlyOffice, which is not available as a FreeBSD port, but is available in a Docker container. Another example might be Resilio Sync, which until recently, was available as a plugin on FreeNAS.

The decision gets harder when an application is available via both mechanisms i.e. both in a Jail or in a Docker container. How do I choose? How do you choose? I invite you to comment below and cast a vote for your preference. If you wish to remain anonymous, just cast a vote (voting buttons above). I'm hoping for and anticipating, some interesting dialogue on this topic.
 
Last edited:

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Docker, unequivocally. Jails are inflexible, and often need custom scripting for application deployment. There's much more choice for Docker automation and deployment. Also, given the pool of IT talent, the supply of skilled FreeBSD administrators/developers is dwarfed by the supply of Linux/Docker administrators/developers.

This is partly due to jails being essentially a chrooted virtual OS, on which an application and all its dependencies can be installed. Docker, on the other hand, encapsulates the application and its dependencies into a single abstracted module, which interacts with Docker in specific ways, and Docker manages the OS interaction.
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
'Which mechanism should I use to deliver applications if I have a choice - Jail or Docker?'
Do you care about how well your application(s) will be able to access data on your pool? -> Jails are better.
Do you care about how much memory and CPU you're consuming on your FreeNAS host? -> Jails are better (by a considerable margin).
Do you want ease of update and lots of available applications for "turnkey" installation? -> Docker is much better.
Do you have no problems with a bit of additional admin to make storage available from your FreeNAS host to the App/container? -> Maybe docker is a good match for you.

Personally, I'm looking forward to TrueNAS SCALE for this very reason as it removes the disadvantages of docker mentioned on the first two points and will provide a way to cluster a few docker hosts together with ZFS-backed storage shared between them for easy access by containers.

I voted Jails (because it's my answer for most important apps for me... for now). I will have a different answer after TrueNAS SCALE is released.
 
Last edited:

warllo

Contributor
Joined
Nov 22, 2012
Messages
117
I prefer docker due to ease of configuration. I also like that I don't have to mess with dependencies and what not. Currently, I have some stuff in a Jail and some stuff running in docker on an Ubuntu VM. I use docker more of my playground or for applications that have frequent updates. The application that has infrequent updates or are applications that I plan on using for a long duration those are the ones I put in jails. I'm really excited about scale and having native docker support.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,464
I don't run VMs on my FreeNAS box--bhyve just isn't there compared to my Proxmox cluster. So if it's going to run on my FreeNAS box, it's going to be in a jail. And since I still don't see what's the big deal with Docker, I'm not likely to use it, even under Linux, unless the software in question is really pushing that solution.
 
Joined
Jan 4, 2014
Messages
1,644
Thank you to everyone who has already cast a vote and/or expressed an opinion. Voting is open for a week and will close on Thursday 13 Aug 2020 at 0230 UTC. You still have time to have your say or vote if you haven't already done so.
 
Joined
Jan 4, 2014
Messages
1,644
Well, the poll has closed and the results are in. The sample size is too small to give a definitive answer one way or the other. It's about neck-and-neck. Both Jail and Docker have strong support bases, though, in time, the suggestion is that we might see a swing towards Docker when TrueNAS SCALE is ready for prime time. At this point in time though, I believe the correct response to the question 'If I had a choice of delivering an application through a Jail or through Docker, I would choose...' is It depends.

I'll quote @sretalla here as his comments best fits this response.

Do you care about how well your application(s) will be able to access data on your pool? -> Jails are better.
Do you care about how much memory and CPU you're consuming on your FreeNAS host? -> Jails are better (by a considerable margin).
Do you want ease of update and lots of available applications for "turnkey" installation? -> Docker is much better.
Do you have no problems with a bit of additional admin to make storage available from your FreeNAS host to the App/container? -> Maybe docker is a good match for you.
 
Last edited:
Top