Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learn Docker - Fundamentals of Docker 19.x - Second Edition
Learn Docker - Fundamentals of Docker 19.x - Second Edition

Learn Docker - Fundamentals of Docker 19.x: Build, test, ship, and run containers with Docker and Kubernetes, Second Edition

By Dr. Gabriel N. Schenker
$29.99 $20.98
Book Mar 2020 592 pages 2nd Edition
eBook
$29.99 $20.98
Print
$43.99
Subscription
Free Trial
Renews at $15.99p/m
eBook
$29.99 $20.98
Print
$43.99
Subscription
Free Trial
Renews at $15.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Learn Docker - Fundamentals of Docker 19.x - Second Edition

What Are Containers and Why Should I Use Them?

This first chapter will introduce you to the world of containers and their orchestration. This book starts from the very beginning, in that it assumes that you have no prior knowledge of containers, and will give you a very practical introduction to the topic.

In this chapter, we will focus on the software supply chain and the friction within it. Then, we'll present containers, which are used to reduce this friction and add enterprise-grade security on top of it. We'll also look into how containers and the ecosystem around them are assembled. We'll specifically point out the distinction between the upstream Open Source Software (OSS) components, united under the code name Moby, that form the building blocks of the downstream products of Docker and other vendors.

The chapter covers the following topics...

What are containers?

A software container is a pretty abstract thing, so it might help if we start with an analogy that should be pretty familiar to most of you. The analogy is a shipping container in the transportation industry. Throughout history, people have been transporting goods from one location to another by various means. Before the invention of the wheel, goods would most probably have been transported in bags, baskets, or chests on the shoulders of the humans themselves, or they might have used animals such as donkeys, camels, or elephants to transport them.

With the invention of the wheel, transportation became a bit more efficient as humans built roads that they could move their carts along. Many more goods could be transported at a time. When the first steam-driven machines, and later gasoline-driven engines, were introduced...

Why are containers important?

These days, the time between new releases of an application become shorter and shorter, yet the software itself doesn't become any simpler. On the contrary, software projects increase in complexity. Thus, we need a way to tame the beast and simplify the software supply chain.

Also, every day, we hear that cyber-attacks are on the rise. Many well-known companies are and have been affected by security breaches. Highly sensitive customer data gets stolen during such events, such as social security numbers, credit card information, and more. But not only customer data is compromised  sensitive company secrets are stolen too.

Containers can help in many ways. First of all, Gartner found that applications running in a container are more secure than their counterparts not running in a container. Containers...

What's the benefit for me or for my company?

Somebody once said that, today, every company of a certain size has to acknowledge that they need to be a software company. In this sense, a modern bank is a software company that happens to specialize in the business of finance. Software runs all businesses, period. As every company becomes a software company, there is a need to establish a software supply chain. For the company to remain competitive, their software supply chain has to be secure and efficient. Efficiency can be achieved through thorough automation and standardization. But in all three areas  security, automation, and standardization  containers have been shown to shine. Large and well-known enterprises have reported that, when containerizing existing legacy applications (many call them traditional...

The Moby project

Originally, when Docker (the company) introduced Docker containers, everything was open source. Docker didn't have any commercial products at this time. The Docker engine that the company developed was a monolithic piece of software. It contained many logical parts, such as the container runtime, a network library, a RESTful (REST) API, a command-line interface, and much more.

Other vendors or projects such as Red Hat or Kubernetes were using the Docker engine in their own products, but most of the time, they were only using part of its functionality. For example, Kubernetes did not use the Docker network library for the Docker engine but provided its own way of networking. Red Hat, in turn, did not update the Docker engine frequently and preferred to apply unofficial patches to older versions of the Docker engine,...

Docker products

Docker currently separates its product lines into two segments. There is the Community Edition (CE), which is closed-source yet completely free, and then there is the Enterprise Edition (EE), which is also closed-source and needs to be licensed on a yearly basis. These enterprise products are backed by 24/7 support and are supported by bug fixes.

Docker CE

Part of the Docker Community Edition are products such as the Docker Toolbox and Docker for Desktop with its editions for Mac and Windows. All these products are mainly targeted at developers.

Docker for Desktop is an easy-to-install desktop application that can be used to build, debug, and test Dockerized applications or services on a...

Container architecture

Now, let's discuss how a system that can run Docker containers is designed at a high level. The following diagram illustrates what a computer that Docker has been installed on looks like. Note that a computer that has Docker installed on it is often called a Docker host because it can run or host Docker containers:

High-level architecture diagram of the Docker engine

In the preceding diagram, we can see three essential parts:

  • On the bottom, we have the Linux operating system
  • In the middle, in dark gray, we have the container runtime
  • On the top, we have the Docker engine

Containers are only possible due to the fact that the Linux OS provides some primitives, such as namespaces, control groups, layer capabilities, and more, all of which are leveraged in a very specific way by the container runtime and the Docker engine. Linux kernel...

Summary

In this chapter, we looked at how containers can massively reduce friction in the software supply chain and, on top of that, make the supply chain much more secure.

In the next chapter, we will learn how to prepare our personal or working environment such as that we can work efficiently and effectively with Docker. So, stay tuned.

Questions

Please answer the following questions to assess your learning progress:

  1. Which statements are correct (multiple answers are possible)?

A. A container is kind of a lightweight VM
B. A container only runs on a Linux host
C. A container can only run one process
D. The main process in a container always has PID 1
E. A container is one or more processes encapsulated by Linux namespaces and restricted by cgroups

  1. In your own words, maybe by using analogies, explain what a container is.
  2. Why are containers considered to be a game-changer in IT? Name three or four reasons.
  3. What does it mean when we claim: If a container runs on a given platform, then it runs anywhere...? Name two to three reasons why this is true.
  4. Docker containers are only really useful for modern greenfield applications based on microservices. Please justify your answer.

A. True
B...

Further reading

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Grasp basic to advanced Docker concepts with this comprehensive guide
  • Get acquainted with Docker containers, Docker images, orchestrators, cloud integration, and networking
  • Learn to simplify dependencies and deploy and test containers in production

Description

  • Containers enable you to package an application with all the components it needs, such as libraries and other dependencies, and ship it as one package. Docker containers have revolutionized the software supply chain in both small and large enterprises.
  • Starting with an introduction to Docker fundamentals and setting up an environment to work with it, you’ll delve into concepts such as Docker containers, Docker images, and Docker Compose. As you progress, the book will help you explore deployment, orchestration, networking, and security. Finally, you’ll get to grips with Docker functionalities on public clouds such as Amazon Web Services (AWS), Azure, and Google Cloud Platform (GCP), and learn about Docker Enterprise Edition features. Additionally, you’ll also discover the benefits of increased security with the use of containers.
  • By the end of this Docker book, you’ll be able to build, ship, and run a containerized, highly distributed application on Docker Swarm or Kubernetes, running on-premises or in the cloud.

What you will learn

  • Containerize your traditional or microservice-based applications
  • Develop, modify, debug, and test an application running inside a container
  • Share or ship your application as an immutable container image
  • Build a Docker Swarm and a Kubernetes cluster in the cloud
  • Run a highly distributed application using Docker Swarm or Kubernetes
  • Update or rollback a distributed application with zero downtime
  • Secure your applications with encapsulation, networks, and secrets
  • Troubleshoot a containerized, highly distributed application in the cloud

Product Details

Country selected

Publication date : Mar 13, 2020
Length 592 pages
Edition : 2nd Edition
Language : English
ISBN-13 : 9781838827472
Vendor :
Docker

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want

Product Details


Publication date : Mar 13, 2020
Length 592 pages
Edition : 2nd Edition
Language : English
ISBN-13 : 9781838827472
Vendor :
Docker

Table of Contents

25 Chapters
Preface Chevron down icon Chevron up icon
1. Section 1: Motivation and Getting Started Chevron down icon Chevron up icon
2. What Are Containers and Why Should I Use Them? Chevron down icon Chevron up icon
3. Setting Up a Working Environment Chevron down icon Chevron up icon
4. Section 2: Containerization, from Beginner to Black Belt Chevron down icon Chevron up icon
5. Mastering Containers Chevron down icon Chevron up icon
6. Creating and Managing Container Images Chevron down icon Chevron up icon
7. Data Volumes and Configuration Chevron down icon Chevron up icon
8. Debugging Code Running in Containers Chevron down icon Chevron up icon
9. Using Docker to Supercharge Automation Chevron down icon Chevron up icon
10. Advanced Docker Usage Scenarios Chevron down icon Chevron up icon
11. Section 3: Orchestration Fundamentals and Docker Swarm Chevron down icon Chevron up icon
12. Distributed Application Architecture Chevron down icon Chevron up icon
13. Single-Host Networking Chevron down icon Chevron up icon
14. Docker Compose Chevron down icon Chevron up icon
15. Orchestrators Chevron down icon Chevron up icon
16. Introduction to Docker Swarm Chevron down icon Chevron up icon
17. Zero-Downtime Deployments and Secrets Chevron down icon Chevron up icon
18. Section 4: Docker, Kubernetes, and the Cloud Chevron down icon Chevron up icon
19. Introduction to Kubernetes Chevron down icon Chevron up icon
20. Deploying, Updating, and Securing an Application with Kubernetes Chevron down icon Chevron up icon
21. Monitoring and Troubleshooting an App Running in Production Chevron down icon Chevron up icon
22. Running a Containerized App in the Cloud Chevron down icon Chevron up icon
23. Assessments Chevron down icon Chevron up icon
24. Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Top Reviews
No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.