How to refresh the build image using docker-compose

To refresh the build image, you need to add --build to the docker-compose command.

What does the build flag do

The --build flag tells docker to compile any Dockerfiles before starting running the compose

docker-compose up --build

Why you should use the flag

Not using the flag aka not refreshing the build image and then making changes is quite a common trap to fall into. This can when starting out with docker-compose!