Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Learn Docker - Fundamentals of Docker 19.x
Learn Docker - Fundamentals of Docker 19.x

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

Arrow left icon
Profile Icon Dr. Gabriel N. Schenker
Arrow right icon
$29.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.8 (6 Ratings)
eBook Mar 2020 592 pages 2nd Edition
eBook
$29.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Dr. Gabriel N. Schenker
Arrow right icon
$29.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.8 (6 Ratings)
eBook Mar 2020 592 pages 2nd Edition
eBook
$29.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$29.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.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
Product feature icon AI Assistant (beta) to help accelerate your learning
Table of content icon View table of contents Preview book icon Preview Book

Learn Docker - Fundamentals of Docker 19.x

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.

Who is this book for?

This book is for Linux professionals, system administrators, operations engineers, DevOps engineers, and developers or stakeholders who are interested in getting started with Docker from scratch. No prior experience with Docker containers is required. Users with a Linux system would be able to take full advantage of this book.

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, Length, Edition, Language, ISBN-13
Publication date : Mar 13, 2020
Length: 592 pages
Edition : 2nd
Language : English
ISBN-13 : 9781838641207
Vendor :
Docker
Tools :

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 feature icon AI Assistant (beta) to help accelerate your learning

Product Details

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

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 131.97
Docker for Developers
$43.99
Mastering Docker, Fourth Edition
$43.99
Learn Docker - Fundamentals of Docker 19.x
$43.99
Total $ 131.97 Stars icon

Table of Contents

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

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.8
(6 Ratings)
5 star 50%
4 star 0%
3 star 33.3%
2 star 16.7%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




livernyc Jan 01, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I really enjoyed this book. It takes a liner path through docker and best practices to orchestrators. The book lets you follow along with examples. I only have a solid Microsoft background and intermediate Linux skills and I was able to follow along pretty much. This is a great book to help you wrap your mind around Docker containers and orchestrators. I'm no expert with these technologies but I definitely recommend this book if you have limited exposure to containers and docker and how they tie into orchestrators.
Amazon Verified review Amazon
Matthew Emerick Jul 14, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
About This BookThis book gives the reader a complete view of Docker, why you should use it, how to use it, and how to use it well. It gives the reader best practices from the beginning, no matter if they are using Windows, Linux, or a Mac. It starts from explaining what containers are, how to set them up, and then goes into tremendous detail on how to use them to the best advantage.Please keep in mind that this book was primarily written with Linux in mind, not Windows. There can be issues if working through this book using Windows. While you can work out how to make it work on your own, it can be very frustrating and ruin your enjoyment of the book. Packt offers a more Windows oriented book on Docker that may be a better match for you. This issue is mentioned on page 34, though would probably have been better placed in the preface to warn the reader before purchase.Who is This For?The author is taking a broad approach by making this for anyone who has no knowledge of Docker but needs to work with the technology. It is a straight forward reference and tutorial that intends to be suited for any beginner or intermediate Docker user.Why Was This Written?Technology is moving at a very fast pace and will continue to for years to come. Containerization is a fairly new, but extremely powerful, technique that is very popular and almost a necessity when entering the workforce as a software developer or architect. This book has every typically use case of Docker covered from installation to automation, making it easier to use than the official documentation.OrganizationThe book is organized into four sections. The first, and shortest, discusses why containers exist, why you should use them, and how to set up your system to use them. Then the book moves on to creating and using individual containers from the initial setup to automating them. Next, the book looks at how containers can work together. Finally, the author details how to use Kubernetes and the cloud with Docker to round out your understanding.Most chapters have a similar structure. They begin with the technical requirements to work through that chapter before moving on to the learning. The chapter finishes with a summary what was discussed, questions to help with your recall of the information, and links to other resources that will let you dig deeper into the chapter's topic.Did This Book Succeed?This book can easily take the place of the official documentation. Looking through the book, I went from having no knowledge of Docker to being competent. After building up some experience with my own projects, I will feel confident enough to work with it professionally.Rating and Final ThoughtsThis is an excellent book for anyone who needs to learn and use Docker. It definitely hits what it's aiming for, with only a few minor issues. I give it a 4.7 out of 5. If you need to learn Docker, this is probably the book for you.
Amazon Verified review Amazon
A R Jul 01, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have struggled with understanding Docker and containerization for a couple years. Mainly due to not using them all the time.Invested time into tutorials and videos, but that did not really cement anything for me.However, reading this book cover to cover and coming back to try some of the practical examples has really worked for me.Well written, gradually building up to slightly more complex scenarios.Technical books have always been a struggle to read through completely for me, yet this book for some reason kept me engaged.Well worth it, examples cover some Python, NodeJS, Java and C#.
Amazon Verified review Amazon
treesa Jun 18, 2020
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Unable to get the exercises to work on my windows machine. So much research to stitch together workarounds. Stopped at ch06.Resumed to absorb the conceptual knowledge and the chapters are networking and orchestration are quite good.
Amazon Verified review Amazon
Just Some Guy Nov 29, 2021
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Here's the TL;DR: This book is good, but it's not great. The tutorials are very good, but you should read other Docker books first to learn the fundamentals, then others again later for reference and depth.The Good:The books is at its best during the numerous step-by-step tutorials, which include ample code and screenshots for reference. The author starts with basic examples, and progresses to increasingly complex topics throughout the book. He does assume a fairly strong foundation in Linux/bash and networking (fair warning), but nothing too extreme for a search engine to answer if pressed.The Bad:This book is in no way a comprehensive education in Docker or Kubernetes. Beyond the specific tasks that the tutorials walk the reader through it does a poor job of explaining (in any real depth) the inner working of Docker/Kubernetes, and/or the wide range of APIs, commands, parameters, configurations, use cases, etc. that each support.No book can cover everything, of course - but I'm really glad I read a few other books on both topics before reading this, as I generally knew all the fundamentals going in (this book then helped me to gain some more hand-on experience, and taught me some great Docker dev techniques and tricks). I'd recommend anyone who wants to *really* learn these technologies start elsewhere first. This book just doesn't go deep outside of the narrow tactical goals which comprise the tutorial content.I should also note that while there are several chapters focused on Kubernetes, it is such a massive topic that this book only offers a very shallow introduction. It's not bad, but again you should start elsewhere to learn the tech, then read this for some nice intro k8s tutorials.The Ugly:This is probably just a personal peeve, but I just can't stand Schenker's writing style. He's just ... not very a very good writer. He writes at a high-school level in both vocabulary and style (the numerous run-on sentences in particular got on my nerves). Furthermore, the 'voice' he uses is far too casual and familiar for my taste (we're not pals talking tech over lunch - I'm paying you to teach me something of value. Act like it, please.). Like, if you have a point to make, don't ask a rhetorical question pretending to be your reader - this isn't a casual conversation. Write like an adult, make your case, and make your point. Thanks.If he matched the loose and sloppy writing with serious depth and value, I'd let it slide - but outside of the tutorials (which _are_ numerous, extensive, and (again) very good), his writing has too much fluff and personality, for too little value (i.e. poor signal/noise ratio).Final word - Read a few other books first, then read this for the Docker tutorials and a decent introduction to Kubernetes.
Amazon Verified review Amazon
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.