Docker-Compose: How To Rebuild Working Application
While developing application and using docker-compose one question quickly arise: How to properly rebuild application? Once an image is built new one will not be built with the same tag as long it exists in a local cache. The compose builds an image it names it with the pattern <context>_<service_name>:latest. Where: Context is directory name where compose YAML is Service is service name in compose YAML file This means that you can stop or takedown the compose application, next time you run it your images will not be rebuilt if they already exist. Anyway, we aim to rebuild/restart only parts of the system that are changed. Once the compose application is running, we only rebuild the service we are working on. ...