Feature request: allow passing a --config option to `cog` to use a different cog.yaml
It would be nice to be able to have multiple cog.yaml files in a repo and be able to pass a --config option to the cog cli like so:
$ cog build -t image_name --config cog.dev.yaml
👍 Great idea. Thanks for the suggestion!
Perhaps the option could be --file/-f for consistency with docker build.
For a long time we resisted adding the option to select a file to Docker. There was a reason for it, but it is fuzzy in my head. Let me try and recall why that was... @aanand do you remember?
I don't think we resisted the --file argument to docker-compose necessarily, but there was certainly a lot of hesitancy over allowing multiple files to be passed in and the semantics thereof. If that's a moot point here, I don't think you have much to worry about.
Right, yes. I remember all that overlaying squabbling.
I vaguely remember there was some resistance to adding it to docker build because it would mean people might put Dockerfile in a non-standard location (which people do lots now! like docker/Dockerfile). That would then mean that docker build wouldn't work by default, and Docker would have to be wrapped with a shell script, or something like that.
Interesting how Dockerfile seems to be a non-standard location fairly often, but I rarely see docker-compose.yml in a non-standard location. Maybe that's because people interact with Compose directly more often, so have less patience for it being in a non-standard location.
I think that's right. It probably never mattered whether docker build with no arguments was a reliably repeatable command, because in practice it's almost always invoked by some CI system, build script, docker-compose file, etc, rather than by hand.
The question, then, is whether cog is more of a docker build-style command (overwhelmingly invoked by computers) or a docker-compose-style command (frequently invoked by humans)?
(that said, it might not matter - as you point out, adding a --file argument to docker-compose doesn't seem to have resulted in a mass of people naming their Compose files something else.)
Cog is a human thing like Compose, so I guess this will be fine. Thanks for your thoughts!
Is it supported now?