Uh oh!
There was an error while loading. Please reload this page.
Extend compose files by allowing multiple files - #2051
Conversation
34b0aa1 to
97ee075Comparednephin
commented
Sep 16, 2015
Ok, I've added some basic docs to the reference, cc @moxiegirl for review I think we'll probably want to add an example which uses this new default override file, but I hope we can work on that as a separate branch. |
There was a problem hiding this comment.
Do you want to log.info if you find an override file? You might be doing this somewhere and I missed it.
There was a problem hiding this comment.
We don't currently log anything about which file is picked if we hit the defaults. A log.debug() might be good for debugging.
There was a problem hiding this comment.
Works for me. Troubleshooting is the exact use case I was thinking of. :-D
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
…nfig doesn't import from cli. Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
881e107 to
4383bb1CompareSigned-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
4383bb1 to
01b7753Comparednephin
commented
Sep 17, 2015
@aanand I think I've addressed your comments Docs are updated as well, and added debug logging for filenames |
There was a problem hiding this comment.
I think this level of terseness effects the readability a bit too much and could do with expanding out, being a bit more verbose. However, I think that's something we can address in a separate PR and not block this one for now.
There was a problem hiding this comment.
I find it hard to be verbose (at least in code!) and always aim for greater density. Let me know how I can make this more readable.
mnowster
commented
Sep 18, 2015
Overall I think this is good and great to get in before code freeze and some concerns around increasing level of verbosity is non blocking, which can be addressed outside of this PR. 🌴 LGTM. |
Signed-off-by: Daniel Nephin <dnephin@docker.com>
01b7753 to
22bc174CompareExtend compose files by allowing multiple files
From user side just run `docker-compose run`, from CI override config with circle file. See `docker-compose` core developer description about using `docker-compose.override.yml`: docker/compose#2051 (comment)
From user side just run `docker-compose run`, from CI override config with circle file. See `docker-compose` core developer description about using `docker-compose.override.yml`: docker/compose#2051 (comment)
From user side just run `docker-compose run`, from CI override config with circle file. See `docker-compose` core developer description about using `docker-compose.override.yml`: docker/compose#2051 (comment)
Somehow I thought that |
dnephin
commented
Feb 15, 2017
It is not the case. The default is |
Vanuan
commented
Feb 16, 2017
If it were defaults, it would fail with "docker-compose.override.yml is not found" |
dnephin
commented
Feb 16, 2017
I left out that bit, but yes, the override is considered optional. There is no flag to define an optional config |
greggwon
commented
Oct 18, 2023
I have a complex C++ application that needs to build with a specific set of tools and libraries. I want to perform the build inside of a container, with everything installed into system directories /usr/lib, /lib, /usr/local/bin, /usr/local/lib etc. To do the build, I mount an "external: false" volume on /usr/local/src. In the Dockerfile, I just install linux with the build tools, and then cd to /usr/local/src, and do "git clone" to download the app which has submodule dependencies for the right versions of things for each branch/tag version I have. The build works. But, I then need to have an saved container without the /usr/local/src mount (and some secrets for GitHub access) that I can then use to run the application on the target hardware/environment. How can I startup the container again, without the volume mounted nor the secrets in view? |
glours
commented
Oct 19, 2023
hey @greggwon For the secret and git credentials you can take a look to https://docs.docker.com/engine/reference/builder/#run---mounttypesecret and https://docs.docker.com/engine/reference/builder/#run---mounttypessh |
greggwon
commented
Oct 19, 2023
The problem is that I need the whole build environment because of the libraries that I am building and installing. But, I don't need the source tree I build from. I don't see how this removes the source tree from the resulting container. |
Resolves#1987
Add support for specifying multiple
-farguments todocker-compose. Multiple files are merged onto each other to allow users to customize the composition for different environments.The default overrides file is
docker-compose.override.ymlwhich is applied over the defaultdocker-compose.ymlif it exists.