DevOps Articles

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

5 Common Mistakes When Writing Docker Compose

4 years ago dzone.com

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

by It makes it easy to: The vision is that someone writes a docker-compose.yml that specifies everything that’s needed in development and commits it to their repo.

A typical pattern for production Dockerfiles is to reduce the number of layers by chaining single commands into one RUN statement.

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.

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