The Whole Shebang: Compose Files
<p>I have recently been <a href="https://medium.com/@cristovaocordeiro" rel="noopener">writing</a> and <a href="https://www.udemy.com/course/docker-crash-course-learn-from-experience-for-beginners/?referralCode=BAC861F284EACA8695FD" rel="noopener ugc nofollow" target="_blank">teaching</a> a lot about Docker and containers in general. I’m very appreciative of those of you who consume my content and provide feedback. I hear you and naturally, the next topic to be tackled is Docker Compose — because since now you know how to build your own container images and run them, the next logical milestone is to create complex multi-container applications and manage all that as a single piece of software.</p>
<h1>Docker Compose: What is it and Why do I need it?</h1>
<blockquote>
<p><strong>Compose</strong> is a tool for defining and running multi-container <strong>Docker</strong> applications.</p>
</blockquote>
<p>You can read more about it from the <a href="https://docs.docker.com/compose/" rel="noopener ugc nofollow" target="_blank">official docs</a>, but to simplify, consider the following: you use <strong>Docker</strong> to manage containers, images, volumes, etc. When you do <code>docker run</code> you are basically executing a <strong>single</strong> container. If you want to start a second container, that somehow interacts with the first one, you’ll need to run <code>docker run</code> again, and take care of their volumes and networks separately, such that they can see and communicate with each other.</p>
<p>Docker Compose abstracts all of this, by providing a <strong>wrapper</strong> on top of Docker (yes! Docker Compose is simply a high-level CLI for Docker). In fact, you’ll see that most options are named in a very similar way to the ones available in the <code>docker run</code> subcommand.</p>
<p><a href="https://betterprogramming.pub/the-whole-shebang-compose-files-5b6f50dd196c">Click Here</a></p>