I'm working on getting a docker-based distributed task system running, and the major sticking point I'm running into is how to get credentials into each docker VM.
Basically, each instance needs to have a unique name and either a password/SSL cert. It then connects back home on startup, and starts processing tasks.
Making the instance is fairly straightforward, but what is a good approach to injecting the credentials into each instance? The general consensus seems to be "use environment variables", but using a 500+ character environment variable (e.g. the whole SSL cert) seems crude.
Right now, the application I'm trying to pack up uses a simple JSON file for configuration. Is there any way to add files to a docker instance at runtime, or something similar? Perhaps a last build-step that takes a parametrically defined file?