Docker in Practice, Second Edition
eBook - ePub

Docker in Practice, Second Edition

Ian Miell, Aidan Sayers

Condividi libro
  1. 384 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Docker in Practice, Second Edition

Ian Miell, Aidan Sayers

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

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

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Docker in Practice, Second Edition è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Docker in Practice, Second Edition di Ian Miell, Aidan Sayers in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Software Development. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Editore
Manning
Anno
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...

Indice dei contenuti