Non-primary containers, source code, and cleaner build steps


My non-primary containers require a bit of configuration - nginx conf, database initialization scripts, things like that. For this case it wouldn’t make much sense to build custom images; they’re just vanilla containers that I run things on. I have no desire to start calling docker commands :slight_smile:

It would be nice to move these blobs, which are currently giant swathes of text in config.yml, into separate files in the .circleci folder, and have the source code mounted / mountable from non-primary containers. Or, as a simpler alternative, how about adding a script key for non-primary containers that would be mutually exclusive with command? The script key would be a text file in your source code that is used as the command text. Something would have to be done to make sure this works no matter where the checkout key is used in the build steps.

As a larger issue, the “primary” distinction feels weird. Do you have any thoughts on removing or reducing that concept? It’s a little strange to me that one particular container is sort of… blessed, and has steps and so forth… and every other container has an implicit single step, which is maybe a bash script. When it’s just postgres or whatever, a single command makes sense, but that isn’t always the case.