Skip to Content
Docker: Up & Running, 2nd Edition
book

Docker: Up & Running, 2nd Edition

by Sean P. Kane, Karl Matthias
September 2018
Intermediate to advanced
352 pages
9h 18m
English
O'Reilly Media, Inc.
Content preview from Docker: Up & Running, 2nd Edition

Chapter 5. Working with Docker Containers

In the previous chapter, we learned how to build a Docker image and the very basic steps required for running the resulting image within a container. In this chapter, we’ll first take a look at the history of container technology and then dive deeper into running containers and exploring the Docker commands that control the overall configuration, resources, and privileges that your container receives.

What Are Containers?

You might be familiar with virtualization systems like VMware or KVM that allow you to run a complete Linux kernel and operating system on top of a virtualized layer, commonly known as a hypervisor. This approach provides very strong isolation between workloads because each virtual machine hosts its own operating system kernel that sits in a separate memory space on top of a hardware virtualization layer.

Containers are fundamentally different, since they all share a single kernel, and isolation between workloads is implemented entirely within that one kernel. This is called operating system virtualization. The libcontainer README provides a good, short definition of a container: “A container is a self-contained execution environment that shares the kernel of the host system and which is (optionally) isolated from other containers in the system.” One of the major advantages of containers is resource efficiency, because you don’t need a whole operating system instance for each isolated workload. Since you are sharing ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Docker in Action, Second Edition

Docker in Action, Second Edition

Stephen Kuenzli, Jeffrey Nickoloff

Publisher Resources

ISBN: 9781492036722Errata Page