Docker挂载S3容器 [英] Docker mount S3 container

查看:310
本文介绍了Docker挂载S3容器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Docker主机内部安装S3容器的最佳实践是什么?有没有办法透明地做到这一点?还是我需要使用VOLUME指令将卷装载到主机驱动器,然后使用CRON手动将文件备份到S3?

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?

推荐答案

在流行的容器存储解决方案(如Flocker和EMC REX-Ray)中似乎并没有对Amazon S3的现成支持.但是,如果您愿意将数据存储在Amazon EBS卷上,则EMC REX-Ray允许您创建,安装和拍摄卷快照.

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.

当然,您建议的方法也可以很好地工作.您可以在运行容器的主机上安装AWS CLI,并编写一个简单的cron作业,将映射到容器卷的主机目录中的数据复制到S3存储桶中.

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.

这篇关于Docker挂载S3容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆