Uploading/Pushing data to Google Cloud Volume

2019-06-07 17:22发布

I have a docker image on Google Container engine with volumes attached to it. Is there a way to get files from my local filesytem to the attached volumes?

标签: docker gcloud
1条回答
叼着烟拽天下
2楼-- · 2019-06-07 17:43

I took the following steps to achieve the above:

  1. Create the directory where the volume should be mounted in the instance.
  2. Format the volume and mount it on the directory created above.
  3. Give the directory write permissions(chmod a+w )
  4. Create the fstab entriy for mounting the volume.

You can then use gcloud compute copy-files to copy files from your local filesystem to the volume, which is mounted on a directory on the instance.

查看更多
登录 后发表回答