There is a small difference in the Docker file keywords ADD and COPY. What can happen if you add something into the docker image is that it might ignore it on the next build, because it is already there.
When working with this typs of files, I normally uses COPY instead. Like this
I appear to be confused about something since, although I did a “docker compose down”, the problem went away when I removed all containers and images and did a “docker-compose up”.
docker-compose down is expected to take down all the containers, networks, images, and volumes but I have noticed that it sometimes does not remove the images. I use the docker-compose build and docker-compose restart commands.
And… I like to use the volume mount instead of rebuilding. Or, I have a Make script that does build the Docker Image and then run the docker-compose-commands needed.