[英]How do you share privileged information with a docker container deployed as a worker on elastic beanstalk?
I have a file containing privileged information (private/public keys, etc) which I don't want to commit to my github repository but is required to run my data processing app. 我有一个包含特权信息(私有/公共密钥等)的文件,我不想将其提交到我的github存储库,但是运行我的数据处理应用程序是必需的。 I'm using elastic beanstalk to deploy this application as a docker container to an EC2 instance. 我正在使用弹性beantalk将此应用程序作为docker容器部署到EC2实例。
Trying to stay away from hacking something together with environment variables. 尽量避免与环境变量一起入侵。 I've seen that using a separate data container and attached data volume might be the proper way to do this. 我已经看到使用单独的数据容器和附加的数据量可能是执行此操作的正确方法。 I haven't been able to get this working properly at this point. 我目前无法正常工作。 I'm also considering using etcd ( https://coreos.com/blog/etcd-2.2/ ). 我也在考虑使用etcd( https://coreos.com/blog/etcd-2.2/ )。
Interested in knowing how other developers are going about this task. 有兴趣了解其他开发人员如何完成此任务。
I forked existed docker image, included special path in every config that my app was needed. 我分叉了一个现有的docker映像,在需要我的应用程序的每个配置中都包含了特殊路径。 Or I create /some_dir inside docker container and create links to those dir. 或者我在docker容器中创建/ some_dir并创建指向这些目录的链接。 For example: 例如:
/etc/apache2 ---> /some_dir/apache2/ / etc / apache2 ---> / some_dir / apache2 /
I run docker container with external volume . 我运行带有外部卷的 Docker容器。 You can read about this "Managing data in containers" : 您可以阅读有关“管理容器中的数据”的信息 :
docker run --rm=true -ti -v `pwd`:/some_privileged_imformation_path my-docker-hub-user/docker-image:${OS_TYPE}${OS_VERSION}_${TAG} myapp
Also I am using https://hub.docker.com/ for free to do automate build of containers on GitHUB . 我也免费使用https://hub.docker.com/ 在GitHUB上自动构建容器 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.