What is a Container

good evening folks this microphone buccaneer again coming at you with some more dagger fun now some of you guys have emailed in said loving the videos which get a better sound quality which we are working on this one should be better but you know you keep talking about docker what's the container so I go ahead and just take a step back and answer that basic question numbers is nothing wrong with basic questions unfortunately they often don't have basic answers so a container first let's talk about what it is not it is not a virtual machine so we're good we're a virtual machine you have a host operating system let's say Red Hat that you might have other operating systems running on as virtual machines right they each contain their own operating system in full stack so you could have like you know CentOS distro running running on the Red Hat coaster you know open to destroy running line I guess I'm going to host Red Hat hosts if you're using Azure it'll Microsoft Azure you probably hasn't been to distro or rather virtual machine right a VM running on a Windows IAS OS because well a jurors windows right the disadvantage or the things understand there is that the virtual machine actually replicating old all the resource intensive nough suffering system right so the host machine that is the actual operating system installed on metal is using whatever resources it needs to use and not sharing them with DP yet so what that means is the VM requires a lot of duplication right has some kernel has whole own environment thinking about it like a Russian doll so it's operating systems and operating systems the monitoring systems a container is a little different and when I say a little different I mean a lot different right so the nice thing about a container is that it can actually in addition to being able to stand alone if is able to share resources a little better with the with the host operating system while still isolating your application from the surrounding so for example one of the reasons you might want to container is I'd like you have a Java app and you don't want it to be tied to what version of Java is on the host machine well the container would accomplish that for you the the difference here between that VM a VM also accomplished that would be right in a virtual machine you might have you know Java 1.8 but on post you might observe a 1.6 or the difference here is the architecture now rather than having again each operating system replicated docker or any container software Bulow's talk about Sargeras running directly on the hosts OS and above that you have two bins in the libraries and I'm going to share a link in the notes here that give you a great kind of infographic of how this works but the idea is that instead of duplicating the OS layer every time you have a container just like you would you know which is what you would do every time you have a VM you're actually just using the hosts OS but container izing in the aspects of your application that you need and i know that is a huge mouthful to me let me kind of pull back a little bit right the container is not a full virtual machine in fact it is not a virtual machine at all so docker is not a version of Linux docker is not an operating system so we're a bunch of Alpine you know fedora Red Hat CentOS are all versions of Linux they're all Linux distributions if you're worth of heard the term Linux distro that's what people are talking about docker is not that so when you are running docker on let's say you know a Red Hat host you are not virtualizing the Linux kernel again right you are using the Linux kernel that is on the Red Hat house but if you are running a virtual machine on that redhead host you have now virtualized an entire an entire additional Linux kernel and all the subsystems and everything that goes with that therefore using more resources right so idea here is very 10,000 feet in the air simply put to the advantages of isolating your application as dependencies without that duplication of resource of resource requirements and you'll be obvious cost and speed a penalty that you might pay for that if you're familiar about bsd containers are basically a lot like bsd jails right say the same idea EST people don't kill me yeah i know that there are differences and implementations and i know if some bsd folks will die on the hill for jails but some conceptual perspective containers are a lot like jails so i hope that helps you if you still have more questions about this i'm happy to answer them either in the comments or you can go to Buccaneer dot IO I'd also ask you to take a look we just redesign our entire site at Buccaneer dot IO so if you like that just let me know give me a thumbs up if you like this channel and more quick tips or more code along tutorials that happens in the previous videos go ahead and subscribe I think it's like over there ish somewhere it's like down this way and yeah reach out again we also have a great guide on getting started with docker compose which is a simply put it's a good way to architect or rather orchestrate all your containers right ok to get it closed orchestrate so take a look at that that will be again down here here somewhere down there in that general direction in the show notes thank you so much and have a great night