April 2017
Beginner
404 pages
9h 30m
English
If there is a change in any service's docker file the image should be rebuilt, use the following command to rebuild the images defined using the build option in the compose file:
docker-compose build
The following command removes any intermediate containers why rebuilding the image:
docker-compose build --force-rm
Docker caches the intermediate layers while building the image to promote reusability, you can force docker to recreate intermediate layers while building an image using the following command. Obviously, this will increase the time to prepare the image:
docker-compose build --no-cache
The following command pulls the latest image used for the service named db:
docker-compose build --pull db
Read now
Unlock full access