Pod overwrites my project code in "Volume Mount Path"
I run my container on pod where all my code lives in "/workspace/project/". When I set "Volume Mount Path" in my pod template to be "/workspace/project/" it overwrites my project code completely. It seems that volume mount happens after container is up and running, which removes everything in my project folder. Is there a workaround for this? (I'm not using a network volume btw)
8 Replies
so your project should be in /workspace/project/project
isnt it?
I tried mounting to "/workspace" or "/workspace/". Once the pod is up and running, it will leave me an empty workspace folder. (My project code is in /workspace/project/". These are the files come docker image)
Am I supposed to load project file to somewhere else then copy and paste to workspace after mounting finished? :think360:
yup cause volume ounts at /workspace
Thanks! Is there a good link that I could learn about network volumes for persistant storage? downloading everything (project code, data) each time i run the pod is time consuming and I could't find any useful youtube tut vids.
Solution
just put files outside of /workspace then sync or copy
I'm currently assuming that if I created a network volume, the things stored in mounted path are also stored in the persistant storage, just like mouting path in docker conatiners.
yes
Thanks!