The course is part of this learning path
Docker Compose Parts
Managing Applications with Docker Compose
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.
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
|Lesson||What you'll learn|
|Introduction||What will be covered in this course|
|Overview||Why we need Docker Compose|
|Compose Files||Everything you need to know about Compose files|
|Compose CLI||How to work with the Compose CLI|
|Run a Web App||How to manage WordPress with Compose|
|Building in Compose||Build Docker images and develop with Compose|
|Extending Compose||See how to extend Compose to work in multiple environments|
|Summary||Review the course and see what's next|
If you have thoughts or suggestions for this course, please contact Cloud Academy at firstname.lastname@example.org.
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.
About the Author
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, MCSE: Cloud Platform and Infrastructure, Google Cloud Certified Associate Cloud Engineer, Certified Kubernetes Administrator (CKA), Certified Kubernetes Application Developer (CKAD), Linux Foundation Certified System Administrator (LFCS), and Certified OpenStack Administrator (COA). He earned his Ph.D. studying design automation and enjoys all things tech.