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

You're reading from   Learn Docker - Fundamentals of Docker 19.x Build, test, ship, and run containers with Docker and Kubernetes

Arrow left icon
Product type Paperback
Published in Mar 2020
Publisher Packt
ISBN-13 9781838827472
Length 592 pages
Edition 2nd Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Dr. Gabriel N. Schenker Dr. Gabriel N. Schenker
Author Profile Icon Dr. Gabriel N. Schenker
Dr. Gabriel N. Schenker
Arrow right icon
View More author details
Toc

Table of Contents (25) Chapters Close

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

Running a multi-service app

In most cases, applications do not consist of only one monolithic block, but rather of several application services that work together. When using Docker containers, each application service runs in its own container. When we want to run such a multi-service application, we can, of course, start all the participating containers with the well-known docker container run command, and we have done this in previous chapters. But this is inefficient at best. With the Docker Compose tool, we are given a way to define the application in a declarative way in a file that uses the YAML format.

Let's have a look at the content of a simple docker-compose.yml file:

version: "2.4"
services:
web:
image: fundamentalsofdocker/ch11-web:2.0
build: web
ports:
- 80:3000
db:
image: fundamentalsofdocker...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime