将数据上传/推送到Google Cloud Volume [英] Uploading/Pushing data to Google Cloud Volume
本文介绍了将数据上传/推送到Google Cloud Volume的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Google Container引擎上有一个Docker映像,并附加了卷。有没有办法将文件从本地文件系统中获取到附加的卷?
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?
推荐答案
我采取了以下步骤来实现上述目标:
I took the following steps to achieve the above:
- 创建实例中应在其中装入卷的目录。
- 格式化卷并将其挂载到上面创建的目录上。
- 赋予目录写权限(chmod a + w)
- 创建用于挂载卷的fstab主体。
- Create the directory where the volume should be mounted in the instance.
- Format the volume and mount it on the directory created above.
- Give the directory write permissions(chmod a+w )
- Create the fstab entriy for mounting the volume.
然后您可以使用gcloudcompute复制文件将文件从本地文件系统复制到安装在目录中的卷在实例上。
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.
这篇关于将数据上传/推送到Google Cloud Volume的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文