Containers have their own language, and those new to Docker should understand some basic concepts and terminology before jumping in. This chapter introduces the vocabulary needed to navigate the terrain and a high-level view of how containers work. Let's begin by looking at containers in the context of another similar solution that readers may already be familiar with: virtual machines.
This is a preview of subscription content, access via your institution.
Tax calculation will be finalised at checkout
Purchases are for personal use onlyLearn about institutional subscriptions
To appreciate how capably containers handle production workloads and availability, consider that everything at Google runs on containers: Gmail, YouTube, even search! cloud.google.com/containers
Three homes and three databases in this example is analogous to running separate hosts. The latter two scenarios focus on methods that share infrastructure and resources of a single host and explore ways of isolating and presenting schemas and data to applications. Containers and virtual machines perform similar roles.
Type 1 hypervisors combine the hypervisor and operating system. Type 2 hypervisors run atop a host operating system.
Containers are even more efficient than shown here. Assuming the three applications hosted in these examples have similar foundations, most, if not all, of the binary, library, and application files of these containers are shared through overlay filesystems. This is discussed in greater detail in Chapter 17.
This is an important difference between images and containers. Containers persist their state information.
Data in containers—including datafiles and configuration—can be persisted outside the container and protected by the same mechanisms used by databases running on bare-metal and virtual machines.
This is a basic example. Builds can involve multiple images and stages and may incorporate techniques to maximize layer reuse and minimize the size of the final image. A main objective of containers is efficiency—smaller images produce containers that pack more densely. Shared layers lower storage even further and take advantage of caching to improve overall performance. Techniques for building efficient images are covered in Chapter 17.
© 2023 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature
About this chapter
Cite this chapter
Scott, S. (2023). Understanding the Container Landscape. In: Oracle on Docker. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-9033-0_2
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-9032-3
Online ISBN: 978-1-4842-9033-0