What is your best practise for mounting an S3 container inside of a docker host? Is there a way to do this transparently? Or do I rather need to mount volume to the host drive using the VOLUME directive, and then backup files to S3 with CRON manually?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
There doesn't seem to out-of-box support of Amazon S3 in the popular container storage solutions like Flocker and EMC REX-Ray. However if you're open to storing your data on Amazon EBS volumes, then EMC REX-Ray allows you to create, mount and take snapshots of your volumes.
Of course, the approach you suggested works perfectly as well. You can install the AWS CLI on the host running your containers and write a simple cron job that copies the data in the host directory mapped to your container volume to your S3 bucket.