简体   繁体   English

您如何与在弹性beantalk上部署为工作线程的docker容器共享特权信息?

[英]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.

相关问题 如何使用Elastic Beanstalk和Java使用cron作业? - How do you use cron jobs using Elastic Beanstalk and Java? 如何为运行 Java 应用程序的多 docker 容器 AWS Elastic Beanstalk 环境动态分配内存 - How to dynamically allocate memory to multi-docker container AWS Elastic Beanstalk environment running Java applications AWS Elastic Beanstalk 中的容器选项 - Container Options in AWS Elastic Beanstalk 在Elastic Beanstalk上部署的Spring应用程序中的登录问题 - Login Issue in Spring Application Deployed on Elastic Beanstalk 你如何在春天改变Docker容器TZ? - How do you change the Docker container TZ in spring? 如何在AWS Elastic Beanstalk部署的Java Web应用程序中启用WebSocket请求 - How to Enable WebSocket request in AWS Elastic Beanstalk deployed Java web application 部署到AWS Elastic Beanstalk后如何访问servlet? - How do I access servlets after deploying to AWS Elastic Beanstalk? 如何在AWS Elastic Beanstalk环境中配置负载均衡器? - How do I configure a load balancer in an AWS Elastic Beanstalk environment? 如何为弹性beanstalk tomcat提供配置 - How do I supply configuration to elastic beanstalk tomcat 如何在 Elastic Beanstalk 上安装 numpy? - How to install numpy on Elastic Beanstalk?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM