Member-only story
Docker Compose Tips & Tricks You Should Know
What would developers lives be like without Docker? We’d probably all be fumbling about installing dependencies on top of each other, pulling our hair out, and wreaking havoc. The software development world would be a fundamentally different place without Docker. This is why it’s important to know the basics not only of Docker, but also one of its most useful modules: Compose.
Docker Compose is a way to build and run many different Docker elements together as one cohesive sytem. You can define containers, networks and volumes within a unified Compose file. This makes it easy to run everything all at once without remembering a bunch of different commands.
Docker Compose used to be a separate standalone program, but has recently been added to Docker. Now you don’t even have to install anything else to start using Compose.
Let’s take a look at some simple tips and tricks you can use to make orchestrating containers even more of a breeze.
Specify build context and arguments
Using Compose is awesome for running pre-built images from a registry, but what about local builds? When you need to run some builds from a local Dockerfile, Compose can do that easily.