Category: Database, Architecture, container, containerization, yaml

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.

Related Articles