Introduction to Containers
Now that we know a bit about images, it’s time to get into containers. As this is a course about Docker, we’ll be talking specifically about Docker containers. However, Docker implements the image and container specs published by the Open Container Initiative (OCI).
This means a lot of what you learn here will apply to other container runtimes that are OCI compliant. Also, the things you’ll learn will help you if you need to learn and use Kubernetes.
Docker containers - The TLDR
A container is the runtime instance of an image. In the same way that you can start a virtual machine (VM) from a virtual machine template, you can start one or more containers from a single image. The big difference between a VM and a container is that containers are faster and more lightweight. Instead of running a full-blown OS like a VM, containers share the OS/kernel with the host they’re running on. It’s also common for containers to be based on minimalist images that only include software and dependencies required by the application.