How does the data in HOME directory persist on cloud shell?

寵の児 提交于 2019-12-24 18:38:47

问题


Do they use environment / config variables to link the persistent storage to the project related docker image ?

So that everytime new VM is assigned, the cloud shell image can be run with those user specific values ?


回答1:


Not sure to have caught all your questions and concerns. So, Cloud Shell is in 2 parts:

  • The container that contains all the installed library, language support/sdk, binaries (docker for example). This container is stateless and you can change it (in the setting section of Cloud Shell) if you want to deploy a custom container. For example, it's what is done with Cloud Run Button for deploying a Cloud Run service automatically.

  • The volume dedicated to the current user that is mounted in the Cloud Shell container.

By the way, you can easily deduce that all you store outside the /home/<user> directory is stateless and not persist. /tmp directory, docker image (pull or created),... all of these are lost when the Cloud Shell start on other VM.

Only the volume dedicated to the user is statefull, and limited to 5Gb. It's linux environment and you can customize the .profile and .bash_rc files as you want. You can store keys in /.ssh/ directory and all the other tricks that you can do on Linux in your /home directory.



来源:https://stackoverflow.com/questions/59339450/how-does-the-data-in-home-directory-persist-on-cloud-shell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!