Uploading/Pushing data to Google Cloud Volume

2019-06-07 17:38发布

问题:

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?

回答1:

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.



标签: docker gcloud