Why do containers even exist?
- [Instructor] So let's take a look at why we would care about containers. In the beginning, you would go to the ops people and say, "I have an app that I want to get on a server." and they'd tell you that's going to take three weeks. That's because they had to order the server and get it in, get it in the rack, and all that other stuff that goes along with getting a machine into your data center. And when the ops people bought a server, did they buy the Intel Celeron processor with 128 megabytes of RAM? No, they bought the 24 Quad-Core Processor server with enough power to run NASA, which left them massively overpowered and massively overpriced and usually at 1 to 3% utilization for that.
Hopefully, the CFO recovers from his coronary over the amount spent on the NASA servers. Then came the VM and it solved a lot of these problems but not all of them. For instance, I don't know about you but when I'm setting up a VM, here we've got the virtual box settings, I have decision anxiety about how much CPU to give it, how much RAM, and how much disk space. When you move to the cloud, it's even more important because how many processors and how much RAM you give it is going to determine how much you pay.
Normally when I talk about Docker, one of the first questions I get asked is, aren't containers just lightweight VMs? If it helps you to think of them that way, that's great, but there are some pretty big differences. Let's take a look.
- Why containers?
- How do containers compare to virtual machines?
- Creating a Dockerfile
- Building an image from a Dockerfile
- Running a container from a new image
- Working with the Docker Compose file format
- Pushing images to Docker Hub