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. I'm using elastic beanstalk to deploy this application as a docker container to an EC2 instance.
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/ ).
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. Or I create /some_dir inside docker container and create links to those dir. For example:
/etc/apache2 ---> /some_dir/apache2/
I run docker container with external volume . 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 .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.