For both volumes and binds I find that changes to files/folders and added files/folders persist. But removed files and folders reappear after a compose down/up. Why is that? How can deletions be made to persist?
it could be either an init script in the docker-compose, or it could be something in your Dockerfile, or maybe one of the libraries you are using might do that on startup, it's hard to say unfortunately, but as far I know, it's not a normal behaviour
I believe I found the reason why this happens: stackoverflow.com/questions/393176...
When running docker-compose, a completely new container is created, with all original files. Then the files that are in my bound volume are added to those files.
I still have not figured out how to do it right. Something about running an image with lots of parameters. Super confusing. I cannot believe that such a common need does not have a simple solution ...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
For both volumes and binds I find that changes to files/folders and added files/folders persist. But removed files and folders reappear after a compose down/up. Why is that? How can deletions be made to persist?
Maybe you have some process that it recreates them on startup?
Thanks, Alessio. So I assume this is not normal behviour? If there is such a process, how could I find out?
it could be either an init script in the docker-compose, or it could be something in your Dockerfile, or maybe one of the libraries you are using might do that on startup, it's hard to say unfortunately, but as far I know, it's not a normal behaviour
Thank you! I'll go check my files.
I believe I found the reason why this happens:
stackoverflow.com/questions/393176...
When running docker-compose, a completely new container is created, with all original files. Then the files that are in my bound volume are added to those files.
I still have not figured out how to do it right. Something about running an image with lots of parameters. Super confusing. I cannot believe that such a common need does not have a simple solution ...