Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Docker

You're reading from   Mastering Docker Unlock new opportunities using Docker's most advanced features

Arrow left icon
Product type Paperback
Published in Oct 2018
Publisher
ISBN-13 9781789616606
Length 426 pages
Edition 3rd Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Scott Gallagher Scott Gallagher
Author Profile Icon Scott Gallagher
Scott Gallagher
Russ McKendrick Russ McKendrick
Author Profile Icon Russ McKendrick
Russ McKendrick
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Docker Overview 2. Building Container Images FREE CHAPTER 3. Storing and Distributing Images 4. Managing Containers 5. Docker Compose 6. Windows Containers 7. Docker Machine 8. Docker Swarm 9. Docker and Kubernetes 10. Running Docker in Public Clouds 11. Portainer - A GUI for Docker 12. Docker Security 13. Docker Workflows 14. Next Steps with Docker 15. Assessments 16. Other Books You May Enjoy

The differences between dedicated hosts, virtual machines, and Docker

So, we know what problems Docker was developed to solve. We now need to discuss what exactly Docker is and what it does.

Docker is a container management system that helps us easily manage Linux Containers (LXC) in an easier and universal fashion. This lets you create images in virtual environments on your laptop and run commands against them. The actions you perform to the containers, running in these environments locally on your machine, will be the same commands or operations that you run against them when they are running in your production environment.

This helps us in that you don't have to do things differently when you go from a development environment, such as the one on your local machine, to a production environment on your server. Now, let's take a look at the differences between Docker containers and typical virtual machine environments.

The following diagram demonstrates the difference between a dedicated, bare-metal server and a server running virtual machines:

As you can see, for a dedicated machine we have three applications, all sharing the same orange software stack. Running virtual machines allow us to run three applications, running two completely different software stacks. The following diagram shows the same orange and green applications running in containers using Docker:

This diagram gives us a lot of insight into the biggest key benefit of Docker, that is, there is no need for a complete operating system every time we need to bring up a new container, which cuts down on the overall size of containers. Since almost all the versions of Linux use the standard kernel models, Docker relies on using the host operating system's Linux kernel for the operating system it was built upon, such as Red Hat, CentOS, and Ubuntu.

For this reason, you can have almost any Linux operating system as your host operating system and be able to layer other Linux-based operating systems on top of the host. Well, that is, your applications are led to believe that a full operating system is actually installed—but in reality, we only install the binaries, such as a package manager and, for example, Apache/PHP and the libraries required to get just enough of an operating system for your applications to run.

For example, in the earlier diagram, we could have Red Hat running for the orange application, and Debian running for the green application, but there would never be a need to actually install Red Hat or Debian on the host. Thus, another benefit of Docker is the size of images when they are created. They are built without the largest piece: the kernel or the operating system. This makes them incredibly small, compact, and easy to ship.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime