Should Plex and Emby be moved over to docker rather then jails...thoughts?

Status
Not open for further replies.

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Docker have way more development going on behind them so things improve faster where as jails have basically stalled compared to it.
Nonsense. Development on (Plex on) Linux moves faster than development on (Plex on) FreeBSD. That's the distinction. Not Docker vs. jail vs. VM vs. LXC vs. whatever other containerization process you might like to think of; it's the underlying OS. And if that's the argument, then we should give up on *nix entirely and just move to Windoze.

Now, if you mean "plugins" when you say "jails", you're closer to right, but then you should be more careful.

Edit: But really, how many times do we need to have this discussion? I thought it had been pretty thoroughly hashed out in the rise and fall of FN10. Docker is in the devs' plans for FN11.1, so if you like your Docker, you can keep your Docker.
 

Magnus33

Patron
Joined
May 5, 2013
Messages
429
No that's what i meant compared to dockers jail development is basically at a stand still.

This not to say there no development in jails its just not on the same scale.

Frankly though this is more a discussion of where media servers are better suited now and less a debate about jails.

Once way back when development on media servers/clients was much slower this would have never come up.
Now though development going crazy and gaps between outdated servers and newer clients cause some serious issues.

I am not dissing jails there are great at what they do and for plugins that auto update they are ideal .

But for ones that require external sources of updating they are less then ideal to have a single person porting them over when there a better alternatives.

Or hopefully one as it remains to be seen how that's going to work on 11.1
 

Magnus33

Patron
Joined
May 5, 2013
Messages
429
Of course if dockers do turn out to work fine in 11.1 you can do both but i can't see why one would want to unless they are running some seriously outdated hardware.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
jail development is basically at a stand still.
Unless you (again) mean "plugin" rather than generally "jail", you're simply wrong here, and "jail development" is simply a nonsensical expression. A jail, as you know, is simply a base FreeBSD installation, and you can install (almost) anything in a jail you can install in a plain FreeBSD install. There's plenty of development going on under FreeBSD, and even the binary packages for Plex are kept pretty up-to-date--or if you don't even want to wait that long, you can download the FreeBSD package directly from plex.tv.
but i can't see why one would want to
Yeah, I'm sure there's nothing to be gained by running software in its native OS without virtualization.
 
Joined
Apr 9, 2015
Messages
1,258
I don't know if you notice last couple of years the core count on mainstream CPU's hasn't been increasing exponentially

And ten years ago there was little reason to have dual core, twenty years ago I literally had someone say "All you will ever need is a single core Athlon" when I was talking about building out a multicore system. Plus look at the Ryzen and i9 cpu's why are more and more cores along with multithreaded cores happening. Most software is not able to use all the available cores but that will change soon enough. Just because plex can use some of the cores doesn't mean it is parallel enough to use all of the cores available especially since the mainstream server they are looking at is something like a core i5 quadcore cpu. If anything I have learned over the years is that more and more cores will be the norm but until it's the norm the software will still lag behind. Don't believe me then fire up two copies of handbrake at the same time on a system with 16 cores and 32 threads and compare it to a single copy.... or just check this out https://www.techspot.com/review/1155-affordable-dual-xeon-pc/page6.html

it's kinda pointless replicating the same video on different resolutions if you're only going to watch it occasionally

With the limited amount of 4k let alone 8k content available I would say the opposite. Most of the time you will be using the lower bitrate resolutions so why would you constantly want to transcode something even with hardware and burn power rather than have a second copy available. That way when you chose to watch the content on a 4k screen it's available but the rest of the time you can use it at a native resolution. It's kinda like saying "I have this 3d tv and it works great when it does the conversion from 2d to 3d on all the movies I have."

There is more overhead but frankly unless your running a low power system that's not going to matter much with today's hardware.

Well lets think about it a little differently then.

Two identical systems are being ran, one with docker and one with a jail. Both do the same thing and do it well. One system uses 15% more power because it has the overhead for a vm and docker shell. It's only 15% but let's say that equals 100 watts. 24 hours in a day and 365 days in a year comes out to 8760 hours. Now that 100 watts becomes 876 kilowatt hours, my rate being an average of 10 cents per kwh in a year I pay an extra 87.6 dollars plus tax to run something in a docker vs a jail. I intend to operate the server for a round 5 years so over the lifetime it uses 438 dollars plus taxes.

Now this is just using some round numbers but you get the idea.

Now though development going crazy and gaps between outdated servers and newer clients cause some serious issues.

As I said before 1.3.3 server with the latest android and LGsmartTV clients and zero issues. And since a jail can be updated directly from the Plex for FreeBSD software which at the time of this posting is:
  • 1.8.1.4139-c789b3fbb
  • August 8, 2017
And the pkg is:
  • 1.8.1.4139
  • 24 Aug 2017 18:53:38

And lets see the the Android app was updated:

  • August 23, 2017
And now lets see when the FreeNAS plugin was updated:

  • plexmediaserver-1.8.1.4139-amd64.pbi
  • 26-Aug-2017 06:35
And FINALLY the official PMS docker:

  • 1.8.1.4139-c789b3fbb
  • 3 days ago (approx August 25th)
So AFTER the Plex PKG was updated and only a day before the FreeNAS Plugin was updated.........

I don't see an issue if the pkg is a few days behind since it took almost the same amount of time for updates to hit the applications that interface with Plex. Plus how is 17 days a 'Crazy gap?' Plus the Docker was updated after the plugin so your argument about the jail system being out of date sir does not hold water. If you still do not believe me click the little blue links where I pulled the information from.
 

zhnu

Dabbler
Joined
Aug 24, 2017
Messages
19
why would you constantly want to transcode something even with hardware and burn power rather than have a second copy available
Storage space.
It's kinda like saying "I have this 3d tv and it works great when it does the conversion from 2d to 3d on all the movies I have."
No it's certainly not the same or a fair analogy.
Two identical systems are being ran, one with docker and one with a jail. Both do the same thing and do it well. One system uses 15% more power because it has the overhead for a vm and docker shell. It's only 15% but let's say that equals 100 watts. 24 hours in a day and 365 days in a year comes out to 8760 hours. Now that 100 watts becomes 876 kilowatt hours, my rate being an average of 10 cents per kwh in a year I pay an extra 87.6 dollars plus tax to run something in a docker vs a jail. I intend to operate the server for a round 5 years so over the lifetime it uses 438 dollars plus taxes.
Another wrong analogy because you're assuming plex is running 24/7 transcoding content most people use it couple of hours a day, 100w is also an unreasonable value, and as I said before hardware transcoding is more than certain the future for this kind of operations.

Plus you should give both a try for a fair comparison you would see why so many people rely on docker.
Skipping what already said for comparison between the two there's also something that jails don't allow you, it's the ability to use other containers to suit your needs (Im not referring the templates that you can edit because if you do that you only get a new template and not a template that's based on another), example Dockerfile:
Code:
FROM plexinc/pms-docker // <- Im refering a Base Image
RUN apt-get install somethingElse // <- A custom instruction
CMD somethingElse && /installBinary.sh // <- Run my thing then the pms.
 

Magnus33

Patron
Joined
May 5, 2013
Messages
429
All good arguments and counter arguments.

Except for the power consumption one it just doesn't add up in real life.

We still got one box running corral and frankly the power usage is so close as to be written off as a variable.
As mentioned above the likes of plex is never being used 24/7 all the time.

As mentioned there are other ways to update plex and but none are ideal when it comes to integration and control through FreeNAS.

This also ignores the fact dockers are going to be used regardless since they have so much support and versatility in terms of what you can do which is far beyond whats available easily in jails.
So if its going to be used why not move the media server options over to it where the updating issues and sheer options increase.

Emby was just updated in plex a couple of days ago and yet here we have yet another update out already.
This kind of thing is a bit much to ask one person to keep porting over all the time.

It just seems the options dockers give you along with its presently level of maturity make it more sensible for the likes of media servers then jails do now.
 
Last edited by a moderator:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Emby was just updated in plex a couple of days ago
WTF? Emby was updated in Plex? I have no idea what that even means.
This kind of thing is a bit much to ask one person to keep porting over all the time.
You keep repeating this, and it continues to be false, though it's becoming increasingly obvious that when you say "jails", you mean "plugins." They aren't the same thing, and you know better. Stop misleading people.

Update issues a concern? No problem. Set up Plex manually in a jail (it takes literally three commands), and add a cron job to run pkg upgrade -y periodically. Updates are now a non-issue. So what are Dockers supposed to do again? And how does that justify the requirement for a VM to run a completely different OS?
 

zhnu

Dabbler
Joined
Aug 24, 2017
Messages
19
So what are Dockers supposed to do again?
So you don't like to read do you? I've posted alot of good reasons and you just shrug them off. Just try it out (not just docker pull and docker run) and then you'll understand how it simplifies things. For some reason jails don't have the number of users docker has and you're dismissing it just because you prefer jails for me is not a matter of love or hate.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I've posted alot of good reasons and you just shrug them off.
I've re-read your posts to this thread. Your "lot of good reasons" are:
1. You find Docker easier to set up and maintain - your opinion is noted.
2. Whatever this means:
FROM plexinc/pms-docker // <- Im refering a Base Image RUN apt-get install somethingElse // <- A custom instruction CMD somethingElse && /installBinary.sh // <- Run my thing then the pms.
 

zhnu

Dabbler
Joined
Aug 24, 2017
Messages
19

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
If you read it you would know that's a sample Dockerfile.
...and its purpose would be...? As near I can tell, you're doing something else before running Plex. Great. Trivially easy to do without Docker. So what about that do you think can't be done in a jail, and why do you think that? You say that Docker uniquely gives you "the ability to use other containers to suit your needs," but how is that any different from installing other software in a jail, or even interacting with software in other jails (both of which are entirely possible)?

Contrary to how it probably looks, I don't have anything against Docker. I don't think I know enough about it to form much of an opinion of it either way, in the abstract. I know that jails are mature and work well. I know that package management is straightforward. I know it's trivially easy to expose datasets on the host to a jail. I know it takes three commands in a jail to get Plex running, and a single-line crontab to keep it up-to-date in perpetuity.

And against that, I see @Zwck writing up, in great detail, how to install RancherOS in a VM, how to write the .yml files to get NFS running (which is required to see data from the host, as you can't simply mount a dataset using nullfs the way you can in a jail), the command lines needed to get a Docker running, etc. And I wonder how that's supposed to be better or easier. And I see the weeping and gnashing of teeth when FN10 dies a swift and well-deserved death, and you'd think the world was about to end because a feature that didn't exist until a month earlier has gone away.

And then I see @Magnus33's dishonest arguments against jails, and I have to think there's nothing better to be said.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
For some reason jails don't have the number of users docker has
Simple, there are more Linux users out there by a huge margin compared to FreeBSD users where jails live and you can't do jails on Linux. I don't see how you could even make that comparison.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Simple, there are more Linux users out there by a huge margin compared to FreeBSD users where jails live and you can't do jails on Linux. I don't see how you could even make that comparison.

Essentially, Linux Containers (LXC) are Jails by another name. And docker is built on LXC.

Docker is neat. It works almost flawlessly. Getting Linux containers and docker working on FreeBSD is a pita.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Linux Containers (LXC) are Jails by another name. And docker is built on LXC.
So in that case, saying "jails don't have the number of users docker has" is kind of nonsensical, no?
 

Magnus33

Patron
Joined
May 5, 2013
Messages
429
WTF? Emby was updated in Plex? I have no idea what that even means.

You keep repeating this, and it continues to be false, though it's becoming increasingly obvious that when you say "jails", you mean "plugins." They aren't the same thing, and you know better. Stop misleading people.

Update issues a concern? No problem. Set up Plex manually in a jail (it takes literally three commands), and add a cron job to run pkg upgrade -y periodically. Updates are now a non-issue. So what are Dockers supposed to do again? And how does that justify the requirement for a VM to run a completely different OS?

Apparently instead of like everyone else the idea of constructive posts and arguments for pro and cons is lost on you.

You so far managed to take things out of context and even managed to to forget you posted the reason why there are drawbacks manual updates.
Yes it easy and quick but as you yourself pointed out it leaves untracked changes.

Also you may want to go through the thread and look at how people are responding.
There giving arguments and counter arguments or posting pro's and cons.

You spend your time commenting on others posts and frankly coming off as a ass.

Ohh and i am not misleading people not to mention i quite sure everyone here is more then intelligent enough to figure things out for themselves.
Everyone else seemed to understand that because emby is in a jail it requires someone to manually port it over and that's just one person.
Who everyone owes their thanks to but its hardly a effective way to do things now.

If you want to respond post the pro's and cons as you see them and let people debate it as this is what i started the discussion for.

Nothing says you have to agree with their responses or even like them but that's the whole point here.

So far all anyone seen is your opinions scattered all over about others posts.

Make a post listing your reasons and i am quite sure everyone else will keep there responses civil.
Without the lol or the like.
We may think a posts funny or a reason silly but its better human nature to keep things civil and not post such things in the forums.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
because emby is in a jail it requires someone to manually port it over and that's just one person.
No, it doesn't. You continue to repeat this, and it continues to be wrong. Hold and express whatever opinions you like, but you aren't entitled to your own facts. The Emby plugin requires someone to rebuild the .pbi in the case of an upgrade. An Emby jail (i.e., a standard jail into which Emby has been installed using the FreeBSD pkg command) can be upgraded as soon as the FreeBSD package is available using pkg upgrade. Jails and plugins aren't the same thing, you know they aren't*, but you continue to equate the two. That's misleading, and it's dishonest. If you can't argue for Dockers without dishonestly conflating jails and plugins, I'd suggest you don't have much of an argument.

You so far managed to take things out of context and even managed to to forget you posted the reason why there are drawbacks manual updates.
Yes it easy and quick but as you yourself pointed out it leaves untracked changes.
No, what you quoted me as suggesting doesn't. pkg upgrade (which is what you quoted me suggesting, and which works just fine in a standard jail) tracks all the changes just fine. The popular PMS_Updater.sh script (which is the only way to upgrade a Plex plugin without waiting for a new version of the .pbi to be built**) doesn't.

Jails are stable, mature, and run natively in FreeBSD. It's trivial to expose storage on the host to the jail. FreeBSD binary packages are generally kept pretty well up-to-date, and package management works well. As a result, deploying PMS in one takes exactly three commands. Keeping it up-to-date requires a single crontab entry.

Docker, OTOH, is foreign to FreeBSD, so it needs to run under another OS (Linux) in a VM. Because it's running in a VM, storage on the host can't be exposed to it without involving a network filesharing protocol and virtualized network hardware. This involves additional overhead and additional points of failure. To offset these drawbacks, here are the advantages claimed in this thread for Docker:
  • Development is faster.
    No, it really isn't. FreeBSD packages are kept up-to-date, particularly for popular packages like Plex.
  • More users.
    I'll grant this is true (since there are lots more Linux users than FreeBSD users), but I don't think it's inherently any advantage for Docker.
  • It's easier.
    That's a matter of opinion, but not one I agree with based on the instructions posted here on how to make use of it. There's lots I don't know about Docker, and probably learning some of that would help--but just about anything is easy once you know how to do it.
  • Whatever that dockerfile @zhnu posted is supposed to do.
    Hopefully he'll explain it a bit--from the description given so far, it just sounds like it does something else before starting Plex. But that can be easily done in jails as well, so there's no apparent advantage to Docker there.

* I'm assuming (and hoping) you understand this distinction, but perhaps I'm giving you too much credit in doing so. You've been active enough around here that you should know better, and you've certainly been told better (including in this very thread), but nothing you're posting indicates you actually understand the difference. I'm not sure which is the more charitable assumption--if you do know the difference, you're being dishonest; if you don't know the difference, you really have no business commenting on the subject.

** OK, it isn't the only way--you could always manually download the tarball from plex.tv and manually install it, rather than letting the script do it for you, or automate that process in a different way--but in any event those changes wouldn't be tracked.
 

zhnu

Dabbler
Joined
Aug 24, 2017
Messages
19
Docker, OTOH, is foreign to FreeBSD, so it needs to run under another OS (Linux)
Yes it's foreign to FreeBSD, it doesn't need another OS to be ran it can run on FreeBSD there's a pkg for it (do your homework).
storage on the host can't be exposed to it without involving a network filesharing protocol and virtualised network hardware
Also wrong, the reason most people mount a NFS share (imagine that adding a cronjob inst hard but automount on a NFS share must be very difficult) is because docker is inside a VM and people want to access a share from their FreeNAS, if it was running native on freenas you could expose storage the same way you do in a jail.
Whatever that dockerfile @zhnu posted is supposed to do.
Imagine you could take a pbi and verbosely add commands to run (or add storage or environment variables etc) when you create a jail from a template, making it more usefull for your use case without loosing the reference to the native template.
Jails are stable, mature, and run natively in FreeBSD
Yeah so is docker, is stable, is used in alot of production environments even more than jails (can't say that the FreeBSD port is perfect or proven that's why I use a VM).

Has I said before I used both, I tested both, I prefer docker, that being said I'm not here to sell you on the idea I'm giving you the pros I found using it on a daily basis vs the jails and if you want another example here:
Hi this is my docker-compose sample file for people who want their services running on docker also uses traefik for reverse proxy and https certificates generation and renewal.
NOTE:
You dont need to open all ports except for 80 and 443 on traefik (and in some cases ports used for dnla and other local network services or in transmission 51413 for better performance) I do it just to be able to access the instances services on my local network bypassing the reverse proxy
Code:
version: '3'
services:

  transmission:
  image: linuxserver/transmission
  volumes:
  - /share/transmission/config:/config
  - /share/transmission/downloads:/downloads
  - /share/transmission/watch:/watch
  environment:
  - TZ=Europe/Lisbon
  - PUID=1001
  - PGID=1001
  ports:
  - "51413:51413/udp"
  - "9091:9091"
  labels:
  - traefik.backend=transmission
  - traefik.port=9091
  - traefik.frontend.rule=Host:transmission.domain.com 
  restart: unless-stopped

  sickrage:
  image: linuxserver/sickrage
  volumes:
  - /share/transmission/downloads:/downloads
  - /share/sickrage/config:/config 
  - /share/sickrage/tv:/tv
  environment:
  - TZ=Europe/Lisbon
  - PUID=1001
  - PGID=1001
  ports: 
  - "8081:8081"
  labels:
  - traefik.backend=sickrage
  - traefik.port=8081
  - traefik.frontend.rule=Host:sickrage.domain.com 
  restart: unless-stopped

  traefik:
  image: traefik
  command: >
  --web
  --docker
  --docker.domain=domain.com
  --docker.watch
  --accesslogsfile=/dev/stdout
  --logLevel=INFO
  --defaultEntryPoints='http,https'
  --acme=true
  --acme.domains='domain.com,transmission.domain.com,sickrage.domain.com'
  --acme.email=your@email.com
  --acme.ondemand=true
  --acme.onhostrule=true
  --acme.storage=/acme/acme.json
  --acme.entrypoint=https
  --entryPoints='Name:https Address::443 TLS'
  --entryPoints='Name:http Address::80 Redirect.EntryPoint:https'
  volumes:
  - /var/run/docker.sock:/var/run/docker.sock
  - /dev/null:/traefik.toml
  - /share/traefik/acme:/acme
  labels:
  - traefik.backend=traefik
  - traefik.port=8080
  - traefik.frontend.rule=Host:traefik.domain.com 
  ports:
  - "80:80"
  - "443:443"
  restart: unless-stopped

  couchpotato:
  image: linuxserver/couchpotato
  volumes:
  - /share/transmission/downloads:/downloads
  - /share/couchpotato/config:/config 
  - /share/couchpotato/movies:/movies
  environment:
  - TZ=Europe/Lisbon
  - PUID=1001
  - PGID=1001
  labels:
  - traefik.backend=couchpotato
  - traefik.port=5050
  - traefik.frontend.rule=Host:couchpotato.domain.com 
  restart: unless-stopped

  plex:
  image: linuxserver/plex
  volumes:
  - /share/plex/config:/config 
  - /share/sickrage/tv:/data/tvshows
  - /share/couchpotato/movies:/data/movies
  ports:
  # Access to the Plex Media Server
  - "32400:32400"
  # Access to the Plex DLNA Server
  - "1900:1900/udp"
  # Controlling Plex Home Theater via Plex Companion
  - "3005:3005"
  # Older Bonjour/Avahi network discovery
  - "5353:5353/udp"
  # Controlling Plex for Roku via Plex Companion
  - "8324:8324"
  # Current GDM network discovery
  - "32410:32410/udp"
  - "32412:32412/udp"
  - "32413:32413/udp"
  - "32414:32414/udp"
  # Access to the Plex DLNA Server
  - "32469:32469"
  environment:
  - TZ=Europe/Lisbon
  - PUID=1001
  - PGID=1001
  - VERSION=latest
  labels:
  - traefik.backend=plex
  - traefik.port=32400
  - traefik.frontend.rule=Host:plex.domain.com 
  restart: unless-stopped

  emby:
  image: emby/embyserver
  volumes:
  - /share/emby/config:/config
  - /share/sickrage/tv:/data/tvshows
  - /share/couchpotato/movies:/data/movies
  environment:
  - TZ=Europe/Lisbon
  - PUID=1001
  - PGID=1001
  labels:
  - traefik.backend=emby
  - traefik.port=8096
  - traefik.frontend.rule=Host:emby.domain.com
  ports:
  #Uncomment if you dont use it on plex
  #- "1900:1900/udp"
  - "7359:7359/udp"
  - "8096:8096"
  restart: unless-stopped


Edit with your settings (domain name, etc) and you do
Code:
docker-compose up
and all those services are automagically reverse proxied with https certificates and automatic renewal.
 
Last edited by a moderator:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Yes it's foreign to FreeBSD, it doesn't need another OS to be ran it can run on FreeBSD there's a pkg for it (do your homework).
My "homework" says:
Docker on FreeBSD is experimental.
If it's "experimental", it isn't mature or stable.
Also wrong, the reason most people mount a NFS share (imagine that adding a cronjob inst hard but automount on a NFS share must be very difficult) is because docker is inside a VM and people want to access a share from their freenas, if it was running native on freenas you could expose storage the same way you do in a jail.
...but it isn't stable on FreeBSD, so it won't be running native on FreeNAS.
 

zhnu

Dabbler
Joined
Aug 24, 2017
Messages
19
My "homework" says:

If it's "experimental", it isn't mature or stable.

...but it isn't stable on FreeBSD, so it won't be running native on FreeNAS.
(can't say that the FreeBSD port is perfect or proven that's why I use a VM)
You're behaving like a petulant child, if you can't read about or test different technologies just because you don't want to that's not my problem. I expose my views on the matter based on facts you base yours on opinion, has I said before test the both and comeback with your findings.
 
Status
Not open for further replies.
Top