DevOps Articles

Curated articles, resources, tips and trends from the DevOps World.

5 Common Mistakes When Writing Docker Compose

5 years ago medium.com
5 Common Mistakes When Writing Docker Compose

Summary: This is a summary of an article originally published by the source. Read the full original article here →

When building a containerized application, developers need a way to boot containers they’re working on to test their code. Then, every developer simply runs docker-compose up, which boots all the containers they need to test their code.

Your production Dockerfile might look like this: This is terrible for development because every time that command is re-run, Docker will re-download all of your dependencies and reinstall them.

It takes some work initially, but the result is that you can see the results of your code changes in 1–2 seconds, versus a Docker build which can take minutes.

In Docker Compose, you can simply add this cached keyword to your volume mounts to get a significant performance guarantee.

Made with pure grit © 2024 Jetpack Labs Inc. All rights reserved. www.jetpacklabs.com