Docker in Practice, Second Edition
eBook - ePub

Docker in Practice, Second Edition

Ian Miell, Aidan Sayers

Buch teilen
  1. 384 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfĂŒgbar
eBook - ePub

Docker in Practice, Second Edition

Ian Miell, Aidan Sayers

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Summary Docker in Practice, Second Edition presents over 100 practical techniques, hand-picked to help you get the most out of Docker. Following a Problem/Solution/Discussion format, you'll walk through specific examples that you can use immediately, and you'll get expert guidance on techniques that you can apply to a whole range of scenarios.Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the Technology Docker's simple idea-wrapping an application and its dependencies into a single deployable container-created a buzz in the software industry. Now, containers are essential to enterprise infrastructure, and Docker is the undisputed industry standard. So what do you do after you've mastered the basics? To really streamline your applications and transform your dev process, you need relevant examples and experts who can walk you through them. You need this book. About the Book Docker in Practice, Second Edition teaches you rock-solid, tested Docker techniques, such as replacing VMs, enabling microservices architecture, efficient network modeling, offline productivity, and establishing a container-driven continuous delivery process. Following a cookbook-style problem/solution format, you'll explore real-world use cases and learn how to apply the lessons to your own dev projects. What's inside

  • Continuous integration and delivery
  • The Kubernetes orchestration tool
  • Streamlining your cloud workflow
  • Docker in swarm mode
  • Emerging best practices and techniques


About the Reader Written for developers and engineers using Docker in production. About the Author Ian Miell and Aidan Hobson Sayers are seasoned infrastructure architects working in the UK. Together, they used Docker to transform DevOps at one of the UK's largest gaming companies. Table of Contents

PART 1 - DOCKER FUNDAMENTALS

  • Discovering Docker
  • Understanding Docker: Inside the engine room

PART 2 - DOCKER AND DEVELOPMENT

  • Using Docker as a lightweight virtual machine
  • Building images
  • Running containers
  • Day-to-day Docker
  • Configuration management: Getting your house in order

PART 3 - DOCKER AND DEVOPS

  • Continuous integration: Speeding up your development pipeline
  • Continuous delivery: A perfect fit for Docker principles
  • Network simulation: Realistic environment testing without the pain

PART 4 - ORCHESTRATION FROM A SINGLE MACHINE TO THE CLOUD

  • A primer on container orchestration
  • The data center as an OS with Docker
  • Docker platforms

PART 5 - DOCKER IN PRODUCTION

  • Docker and security
  • Plain sailing: Running Docker in production
  • Docker in production: Dealing with challenges

HĂ€ufig gestellte Fragen

Wie kann ich mein Abo kĂŒndigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kĂŒndigen“ – ganz einfach. Nachdem du gekĂŒndigt hast, bleibt deine Mitgliedschaft fĂŒr den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich BĂŒcher herunterladen?
Derzeit stehen all unsere auf MobilgerĂ€te reagierenden ePub-BĂŒcher zum Download ĂŒber die App zur VerfĂŒgung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die ĂŒbrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den AboplÀnen?
Mit beiden AboplÀnen erhÀltst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst fĂŒr LehrbĂŒcher, bei dem du fĂŒr weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhĂ€ltst. Mit ĂŒber 1 Million BĂŒchern zu ĂŒber 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
UnterstĂŒtzt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nÀchsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Docker in Practice, Second Edition als Online-PDF/ePub verfĂŒgbar?
Ja, du hast Zugang zu Docker in Practice, Second Edition von Ian Miell, Aidan Sayers im PDF- und/oder ePub-Format sowie zu anderen beliebten BĂŒchern aus Computer Science & Software Development. Aus unserem Katalog stehen dir ĂŒber 1 Million BĂŒcher zur VerfĂŒgung.

Information

Verlag
Manning
Jahr
2019
ISBN
9781638356301

Part 1. Docker fundamentals

Part 1 of this book consists of chapters 1 and 2, which get you started using Docker and cover its fundamentals.
Chapter 1 explains the origin of Docker along with its core concepts, such as images, containers, and layering. Finally, you’ll get your hands dirty by creating your first image with a Dockerfile.
Chapter 2 introduces some useful techniques to give you a deeper understanding of Docker’s architecture. Taking each major component in turn, we’ll cover the relationship between the Docker daemon and its client, the Docker registry, and the Docker Hub.
By the end of part 1 you’ll be comfortable with core Docker concepts and will be able to demonstrate some useful techniques, laying a firm foundation for the remainder of the book.

Chapter 1. Discovering Docker

This chapter covers
  • What Docker is
  • The uses of Docker and how it can save you time and money
  • The differences between containers and images
  • Docker’s layering feature
  • Building and running a to-do application using Docker
Docker is a platform that allows you to “build, ship, and run any app, anywhere.” It has come a long way in an incredibly short time and is now considered a standard way of solving one of the costliest aspects of software: deployment.
Before Docker came along, the development pipeline typically involved combinations of various technologies for managing the movement of software, such as virtual machines, configuration management tools, package management systems, and complex webs of library dependencies. All these tools needed to be managed and maintained by specialist engineers, and most had their own unique ways of being configured.
Docker has changed all of this, allowing different engineers involved in this process to effectively speak one language, making working together a breeze. Everything goes through a common pipeline to a single output that can be used on any target—there’s no need to continue maintaining a bewildering array of tool configurations, as shown in figure 1.1.
Figure 1.1. How Docker has eased the tool maintenance burden
At the same time, there’s no need to throw away your existing software stack if it works for you—you can package it up in a Docker container as-is, for others to consume. As a bonus, you can see how these containers were built, so if you need to dig into the details, you can.
This book is aimed at intermediate developers with some knowledge of Docker. If you’re OK with the basics, feel free to skip to the later chapters. The goal of this book is to expose the real-world challenges that Docker brings and to show how they can be overcome. But first we’re going to provide a quick refresher on Docker itself. If you want a more thorough treatment of Docker’s basics, take a look at Docker in Action by Jeff Nickoloff (Manning, 2016).
In chapter 2 you’ll be introduced to Docker’s architecture more deeply, with the aid of some techniques that demonstrate its power. In this chapter you’re going to learn what Docker is, see why it’s important, and start using it.

1.1. The what and why of Docker

Before we get our hands dirty, we’ll discuss Docker a little so that you understand its context, where the name “Docker” came from, and why we’re using it at all!

1.1.1. What is Docker?

To get an understanding of what Docker is, it’s easier to start with a metaphor than a technical explanation, and the Docker metaphor is a powerful one. A docker was a laborer who moved commercial goods into and out of ships when they docked at ports. There were boxes and items of differing sizes and shapes, and experienced dockers were prized for their ability to fit goods into ships by hand in cost-effective ways (see figure 1.2). Hiring people to move stuff around wasn’t cheap, but there was no alternative. This should sound familiar to anyone working in software. Much time and intellectual energy is spent getting metaphorically odd-shaped software into differently-sized metaphorical ships full of other odd-shaped software, so they can be sold to users or businesses elsewhere.
Figure 1.2. Shipping before and after standardized containers
Figure 1.3 shows how time and money can be saved with the Docker concept. Before Docker, deploying software to different environments required significant effort. Even if you weren’t hand-running scripts to provision software on different machines (and plenty of people do exactly that), you’d still have to wrestle with configuration management tools that manage state on what are increasingly fast-moving environments starved of resources. Even when these efforts were encapsulated in VMs, a lot of time was spent managing the deployment of these VMs, waiting for them to boot, and managing the overhead of resource use they created.
Figure 1.3. Software delivery before and after Docker
With Docker, the configuration effort is separated from the resource management, and the deployment effort is trivial: run docker run, and the environment’s image is pulled down and ready to run, consuming fewer resources and contained so that it doesn’t interfere with other environments.
You don’t need to worry about whether your container is going to be shipped to a Red Hat machine, an Ubuntu machine, or a CentOS VM image; as long as it has Docker on it, it’ll be good to go.

1.1.2. What is Docker good for?

Some crucial practical questions arise: why would you u...

Inhaltsverzeichnis