Check out a free preview of the full Complete Intro to Containers (feat. Docker) course

The "Wrapping Up" Lesson is part of the full, Complete Intro to Containers (feat. Docker) course featured in this preview video. Here's what you'd learn in this lesson:

Brian wraps up the course by sharing additional topics that students can learn about, additional resources about non Docker containers, and information about orchestration systems such as Docker Swarm, Apache Mesos, and Hashicorp Nomad. Questions are fielded from the audience about container monitoring, using Gatsby with containers, and the difference between CMD and run.


Transcript from the "Wrapping Up" Lesson

>> So that brings us to the conclusion of our course. You survived Builder, you survived podman, you survived Kubernetes, that's something that you can like right on your resume that like I survived Kubernetes, all right? You learned a lot of stuff about Docker, which is awesome, you learned what a Container is, you learned how to handcraft container which is, again, what more than a lot of people can do that use containers every day.

You'll learn what Docker is, where it can be useful, how to set up Docker files for both development and production, how to set up networks in Docker, bind mounts, volume, Docker compose and then a great introduction to the Ecosystem at large which would be Podman and Builder and stuff like that.

The things that I think that will immediately help you as an engineer, as a developer is how to make a share developer container, I think that's very useful. How to make that work with Visual Studio Code which a few of us could use or make that very useful for you right away, how to get up and going if someone gives you a container right?

Like if someone from your office teams has accused the container now you know what to do with it, right? And then how to start smaller scale like multi container projects with Docker compose and then eventually Kubernetes. I think those are like the key, immediately useful takeaways, I think everything else is just kind of knowing the ecosystem around containers.

And then I think containers are just gonna become more and more important, right? Some of these like techniques that I've shown you are becoming more common at companies like Microsoft and Google and I think that's going to permeate down into these smaller companies as well, right? So I think you're ahead of the curve if you've gotten this far in the course of where the ecosystem and where the environment of the industry is going.

And there's other things really cool that we didn't talk about, things like Azure Container Instances, AWS Fargate, Google Cloud Run, Visual Studio Online is another one that's really cool. And these are all things that are centered around containers like something like a CI Azure Container instances or Fargate, or Cloud Run.

What you do is you give the cloud providers like here's my container, and then the cloud provider just takes in the container and starts running it and then it'll scale it up and scale down for you, it's their serverless containers. And you don't have to manage them, you dont have to scale them or anything like that, everything just kind of works so definitely check those out, those are a lot of fun.

So I'm gonna come in here to the notes, and we're just gonna go over some last ecosystem things that you can go and do more investigation if you're interested. So it's here in the conclusion section. So if you want more container runtimes alternatives to build a Podman and Docker, there's lxc and lxd.

So lxc, this also comes out of the open container, LINUX foundation kind of project, Docker used to based on lxc so it's kind of a fundamental building block. And so it's also based around containers, lxd is the daemon that runs in the background, the idea with lxd versus Docker.

Docker is very much build for, I'm wanna spin up and destroy containers and I don't really care how frequently I do that, right? Nothing is meant to live forever, everything is disposable, that's kind of the Docker way. With lxd this is meant for containers that are gonna be running for a very long time, right?

So these ones you gonna spin off a container, then you gonna go in and you gonna customize it, right? Lxd is for snowflake containers that you wanna keep running for a very, very long time. Then there's rocket, rkt which is from CoreOS and CoreOS just got bought by Red Hat and Red Hat got bought by IBM so IBM eventually owns rocket.

It's very much meant to pair with CoreOS and it has the core idea of pods. And this is the exact same idea of pods to Kubernetes where you have these atomic deployments of five containers that are all bundled together, that's built into rocket whereas Docker doesn't necessarily have a concept of pods, right?

So if you have that idea, then rocket's a good fit for you, it's also built into CoreOS, so if you're interested in that, in CoreOS, then rockets a good fit for that. Okay, and so we talked about Kupernetes which is an orchestration system, that's what you would call Kupernetes, it's a container orchestration system.

There are a few others that you might wanna be aware of as well, Docker Swarm so built into Docker. In fact, if you come in here to close this close this town. If you say docker swarm like that, there's a whole bunch of stuff in here about how to initiate swarms and swarms are comparable to Kubernetes, right?

You can have multiple containers being managed, I like how they're managed with Docker Swarm. So I link to their to their documentation if you're interested in doing Kubernetes like things, but with swarm, it's simpler, it's simpler, it's less powerful than Kubernetes. So it's actually very tempted to teach that too because I think it's a better way to get started with it but the thing is people wanna know Kubernetes, right?

That's what everyone's saying, everyone's very interested and it's like decided to go that path but if you're interested in, I would definitely suggest you pick on Dockers form. On other side of that is Apache Mesos and Mesos is super hard, like I can't even get it started and I'm not even joking and try to get it started and I couldn't.

So, it's even more powerful perhaps than Kubernetes, I don't know if I can back it up but it's as powerful as Kubernetes at least, but it's just very difficult to use. They've actually built a layer on top of the called Mesosphere which allows it to be a little bit more simple to use on.

And now there's another layer on top of Mesosphere and the name escapes me but it's layers upon layers of being very difficult to use, but it does the same thing where you can orchestrate complex applications with Mesos. Mesos came out of Twitter, right? So now, all of Twitter's infrastructure is built with Mesos, whereas like Google invented Kubernetes.

So they have a system called Borg and they kind of export that architecture and that became Kubernetes. Internally inside of Google, they still use Borg, though, just in case you're wondering. So I guess Mesos was invented at Berkeley and then Twitter adopted it I think that's more accurate way of putting it.

The newcomer on the scene is a Hashicorp Nomad, I mentioned many of you know, Hashicorp, they did Vagrant, they did Terraform, they did console. They do a lot of tools that DevOps engineers really quite like, myself included, I think Hashicorp is a great company doing great stuff. And so they have recently come out with Nomad and Nomad is much more limited than Kubernetes, Kubernetes does a lot of stuff for you, like load balancing and a whole bunch of other stuff, right?

It does everything out of the box, it's meant to be the kitchen sink of orchestration tools, Nomad is just the orchestration part and it is nothing else. So, if you're into that, kind of, that Unix methodology of, like, this tool does one thing, and it does it super well, and it is literally nothing else, Normad is probably what you're looking for.

So, it's meant to pair with things, like, Terraform, and Console, and Vault and all their various different tools together. Like, for example, we didn't talk about Kubernetes as a secret management, right? There's a secret management tool built into Kubernetes, it's not built into Nomad, they have a separate product called Hashicorp Vault, and that's meant to pair it together with Nomad.

So, check that as well, people are liking it so that's all I really can say about that but I like and trust Hashicorp. Something that we didn't really talk a ton about is what is the host, what is running your servers in production, right? Now sometimes you're just giving your containers to Azure and say, hey, Azure, execute this for me, right?

In which case you don't care about what's running it because the cloud provider is choosing it and not you. But if you're running your own VM's and your VM's are executing your containers, you'd have to choose what the host operating system is. So, there's one called CoreOS Container Linux.

This is, or people just call it CoreOS, they don't separate out the Container Linux is different but it actually technically is called Container Linux and is made by CoreOS. So it's a minimal Linux OS host, it's one of the most popular ones for sure and it just shipped with a bunch of tools that make it very simple to get started with containers so that's a very popular one.

I like RancherOS, I started playing with the other day and it's just a It's a very strange operating system in a fun way, that normally you have like bashes like the PID1, like the first thing that execute, with Ranchero is everything is executed by Docker, everything is a container.

So if you execute anything within Rancher, it's Docker that's doing the execution of it so every single process is a container, which is really, really fun. So, definitely give it a shot. There's one called Ubuntu, I think we've all heard of this, right? Ubuntu is really great executing containers, I think they have a project that actually is meant, they have like a specific distribution of it.

I can't remember it's called a Snappy, might be called Snappy something like that but you can also use Fedora, you can use DBN, any one of those Linux Operating Systems. There are not built for containers, but they are built for everything, but containers are part of everything so it's a valid choice to think about using those as well.

And this one out here that I wanted to called DC/OS, this is strongly associated not with Kubernetes with Mesos. However, I am told that DC/OS can definitely run Kubernetes as well and it can be controlled, You can have Mesos and Kubernetes talk to each other, which just sounds like some sort of hell that I don't wanna be in.

So anyway, DC/OS, which stands for Distributed Cloud Operating System, it's very unique. Yeah, people really like DC/OS more than they like Mesos, I've never used it so I'm not gonna tell you anything more about it than that, but people like it. And then VMWare Photon comes from the company VMWare which makes a bunch of tools that you probably are already using.

They recently came up with their own container IOS operating system called Photon so it's meant to mostly pair into their other tools like vSphere and such. So I think we had some good questions from the audience, one of them I remember that are from the online crowd, one of the they asked was, what's the difference between CMD and Rin?

So let's go take a look at that really quick. Here my Docker file, you can see here I have RUN, and I have CMD down here at the end. One of these is done at runtime and one of them is done at build time so RUN, this is going to get run as soon as I say Docker built, right?

So you're gonna do all the dependencies installing when you're building the container and CMD is where you're telling Docker is like when someone runs this container, when someone does Docker run, Run this, right? So this is at runtime, this is a build time. You are also very likely gonna have multiple Docker Run or you gonna have RUN and you can see here I have three RUNs in here.

Whereas you only ever have at most one CMD.
>> Can this be set up with Gatsby as well, and those having a VS Code extension help set this up pretty easy? This is the question.
>> Sure, like we did Hugo before, could you do this with Gatsby? And the answer is absolutely, right?

So if you had like a Gatsby project and you're working with a bunch of people that didn't know how to use Node and NPM and all that kind of stuff, you could totally wrap this up in a container. It would work just as well, my guess is that there's probably, already a Gatsby container or Docker does the exact same thing.

So yeah, for sure, you can definitely do that. Something I didn't really get into as much in here, cuz the person mentioned VS Code is the Docker extension for VS Code. You can see here that it shows me all of my containers or in fact, I can see here that my builder container is actually still running, and I can just say, you know what, I'm done with this, stop and it will just stop my container for me, just like that.

And here I can come here and run, I can pull containers, here's all my images that I've pulled where I can see that I have various versions of alpine, I have various versions of node app, builder, codesmith that's one that I built awhile ago for our good friend, will sentence, actually.

So, this is something worth checking out as well so you can see I'm also connected to an Azure registry, is that true? No, I would have to sign in but you can connect it to Azure, you can connect it to Google, or GitHub, or all these things as well, yeah.

>> Another question, what would be the best way to monitor an alert on containers going down at scale?
>> That is a good question, what's the best way to monitor? There's a lot of products that do this for you, you can go as far as using things like New Relic which work really well and they have specific things for containers.

Each of the cloud provider has various different mechanisms for monitoring, like Azure we have App Insights, I think it's Cloud Watch for AWS. I don't remember what GCP's is called, but they all have their own specific incantations thereof That being said, there are probably other tools like you can use things like StatsD and NSCD.

Not NSCD but rather StatsD for doing some sort of consolidated logging, there's a lot of different products out there. I'm not more familiar with any one of them than the other, there's also Sentry, Sentry would be a good one. So, honestly there's not much difference between what you would be concerned about versus what Kubernetes is doing, versus what a normal web service is doing.

You're gonna treat them relatively the same way for the most part. There's some specific Kubernetes stuff, and your cloud provider will provide that for you. All right, well, congratulations. This is a deeply technical topic and hopefully was presented to you in such that like you learned something about it, I had a lot of fun creating this course for you.

If you liked it again, a start and GitHub says a lot helps me, feel free to Tweeted me, file issues, open PRs. I already saw someone open a PR last night so I'm gonna go merge that so thank you for helping me make the best course possible. Thanks again to Frontend Masters and the whole crew.

You all are the best. But in the end, I think containers are gonna be important tools for all of you, whether you write CSS, Haskell, or NodeJS. Like it's useful to everyone, and I think going forward, you are gonna be ahead of that curve because you took this course.

So thank you.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now