The course is part of these learning paths
Docker Compose is an open-source tool for managing multi-container applications with Docker. With Docker Compose, you can describe environments using a declarative syntax and Compose will do all of the heavy-lifting to create the environment. Compose also has built-in logic to make updating environments easy and efficient. It's not only useful for deploying pre-built images, though. You can use it during development to easily manage dependencies for projects. If that sounds interesting, you are in the right place!
In this course, we’ll go over what Docker Compose is and why you would use it. Then we’ll explore the two parts of Docker Compose: Docker Compose files and the Docker Compose command-line interface. Next, we’ll get into demo-focused lessons beginning with running a web application with Compose. After that, we’ll see how to build images in a development scenario with Compose. Lastly, we’ll see how to use Compose to adapt an application to multiple different environments. In particular, we’ll see how to use Compose to manage an application in development and production.
If you have thoughts or suggestions for this course, please contact Cloud Academy at firstname.lastname@example.org.
By the end of this course, you'll be able to:
- Describe the anatomy of Docker Compose files
- Configure your application using Docker Compose files
- Use the Docker Compose CLI to manage the entire lifecycle of applications
- Build your own images from source code with Docker Compose
- Extend Docker Compose files to adapt applications to multiple environments
This course is for anyone interested in working with Docker, including:
- DevOps Engineers
- Cloud Engineers
- Test Engineers
This is an intermediate-level course that assumes:
- You have experience working with Docker
- Some understanding of software development is also beneficial
The GitHub repo for this course can be found here.
Congratulations! You made it to the end of the course. I hope you enjoyed the course and learned a lot along the way. Let’s talk a walk down memory lane together.
We began the course by introducing the problems that Compose aims to solve. Namely, simplifying the process of managing multi-container applications in Docker. Then we dove in to study the anatomy of Compose files. We covered a relatively small but powerful subset of YAML that I said was enough to understand all the examples in the course. Looking back, it was enough wasn’t it. I think you’ll find that it’s enough to understand almost any Compose file you come across. The YAML mapping used to declare multi-container applications in a Compose file has four top-level keys: version, services, volumes, and networks. We went into the details of each and drew upon experience with Docker commands to make it easier to write our own Compose files. We then covered the other part of Compose, the Compose CLI. In addition to many familiar commands that are generalized to work with multi-container applications, Compose introduces two new commands: up and down. We then demonstrated how to use Compose to manage WordPress, a popular content management system. The lessons learned applied to managing applications made up of pre-built images. We then looked at using Compose in development scenarios when you need to build the image yourself and still be able to modify the source code. This is possible with the build configuration that works with plain old Dockerfiles and strategically mounting volumes. Lastly, we saw how Compose can be used to manage applications that target multiple environments, such as development and production. Compose override files make it possible to do without duplicating common configuration shared between environments.
By taking this course, you have achieved the following learning outcomes:
• Understand the anatomy of Docker Compose files
• Configure your application using Docker Compose files
• Use the Docker Compose CLI to manage the entire lifecycle of applications
• Build your own images from source code with Docker Compose
• Be able to extend Docker Compose files to adapt to multiple environments
There are a few places I’d recommend for learning more. Try out some of the labs, quizzes or other courses on Cloud Academy. There is content on Compose as well as Docker swarm mode which lets you run multi-container applications on a cluster of computers instead of a single host.
The Docker Compose docs are a great place to learn all the intricacies of Compose and to stay on top of release changes.
The Docker Compose GitHub repository is also a good place to learn about what’s coming next for Compose and learn from discussions around reported issues. Of course, you can file your own issues and even contribute to the code base.
The broader GitHub community can also be a great place to learn more about using Compose. There are around a quarter of a million Compose files using the default docker-compose.yml or .yaml name on GitHub.
I’m happy to hear from you. I make content for you. If you have any feedback, please get in touch with me by leaving a comment on the Comments tab below the video, by emailing email@example.com, or by connecting with me on Twitter where my handle is @LoganRakai.
That’s all for this course on managing applications with Docker Compose. I want to end by thanking you for going through the course with me. It’s been a blast! Now go on and put what you’ve learned here into action. Until next time, I’m Logan Rakai with Cloud Academy.
Logan has been involved in software development and research since 2007 and has been in the cloud since 2012. He is an AWS Certified DevOps Engineer - Professional, AWS Certified Solutions Architect - Professional, Microsoft Certified Azure Solutions Architect Expert, MCSE: Cloud Platform and Infrastructure, Google Cloud Certified Associate Cloud Engineer, Certified Kubernetes Security Specialist (CKS), Certified Kubernetes Administrator (CKA), Certified Kubernetes Application Developer (CKAD), and Certified OpenStack Administrator (COA). He earned his Ph.D. studying design automation and enjoys all things tech.