Docker in Practice, Second Edition
eBook - ePub

Docker in Practice, Second Edition

Ian Miell, Aidan Sayers

Partager le livre
  1. 384 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Docker in Practice, Second Edition

Ian Miell, Aidan Sayers

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

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

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Docker in Practice, Second Edition est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Docker in Practice, Second Edition par Ian Miell, Aidan Sayers en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Software Development. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Éditeur
Manning
Année
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...

Table des matiĂšres