TLDR; If you have a docker project with a volume-mapping pointing to the root of the project folder and you rename that folder + re-create the project with the same docker configuration in the original folder name, then that volume will point to the renamed (old) folder instead of the current one. Pruning seems to have no effect on this.
How can this rerefence/pointer be deleted?
Prior to my problem I had been experimenting with a github project that provided docker configuration to run things. In the docker-compose file there was a volume directive stating:
volumes: - .:/var/www
After playing around with it, I decided to do a fresh clone and start from scratch, but because I wanted to be able to see the things I had tried out so far I renamed the folder of the project on my local disk to [folder name]-bak and unzip the original zip-file, which created a folder with the same name, but without my changes.
After building the project again, it then appeared that my changes on the local file-system where no longer reflected in the docker container and worse - I could still see all my old changes from the previous docker image. I suspected some kind of cache, so pruned everything there is to prune (system, volume, etc.) but still I kept seeing my old changes. Until I finally realized that maybe the volume reference to the local filesystem had changed when I renamed the parent folder to -bak . And this appeared to be the case. Any modification I did in the -bak folder was reflected in the docker container of the new folder. (btw, because it provided a web-app, I could test these changes in a browser)
How can I ‘reset’ this? I want docker to forget this reference and create a reference to the local filesystem as if I did it for the first time.