-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compose does not support 'configs' configuration with v3.3 #5110
Comments
What is your question? |
According to the documentation this should be supported: https://docs.docker.com/compose/compose-file/#short-syntax So what is the correct solution to using configs in docker-compose v3.3? I am unable to deploy a stack (or is it a swarm) without completely redesigning compose files and this is a massive headache compared to the functionality of the previous minor release. |
Configs are only used when you deploy on Swarm mode using HTH |
Does the same apply to secrets now? |
We went with a compromise for the secrets implementation, see #4994 for details. |
Looks like documentation is written in a science-fiction manner. |
I wish a compromise would also be taken for |
This only confuses people. There's no reason why docker-compose supports secrets but not configs, since both can be implemented the same way. At least are you accepting PR for this? |
@HACKTIVISTA We don't want to commit to continued support for |
@shin- I don't understand this. Can you please explain? |
Also just hit this issue. It is not obvious to me why docker-compose supports secrets but not configs. Especially for running swarm stacks locally via compose it would be nice to support this. |
the docs do not make clear that this is a swarm-only feature. would it be possible to add a line saying as such? |
I just fell down the same rabbit hole as everyone above ^^^ Would be nice if the docs indicated the "configs" option is only for swarm. |
I don't agree on refusing to do what's right based on suppositions. But if you're decided, come on, is that difficult to add a warning in docs? |
Thanks for the feedback! Feel free to submit a PR to the docs repo |
Just ran into this issue. It would be great to hear from maintainers as to why they've decided to make this choice; the referenced issue didn't really elucidate anything. |
This just makes the whole thing very confusing:
https://docs.docker.com/v17.09/engine/swarm/configs/#defining-and-using-configs-in-compose-files |
It makes no sense that configs are not supported for non-swarm uses. It's a pain-in-the-hoo to make a Dockerfile just to pull in a config. :/ |
If configs aren't supported by docker-compose then it would be nice if the docs made that quite clear. Currently, the compose file reference features an extensive section on configs that doesn't mention anywhere that the feature is not supported by docker-compose. This means that Docker users who read the docs and decide to invest their time trying out this feature are confronted with a warning that the configs key will be ignored, and that actually "Compose does not support 'configs' configuration", which is a tad frustrating. |
sorry for the late response, what is the proper way to use run time configuration( when run dockers local with docker-compose without swarm orchestration)? |
@lironmo I think you're SOL. You can use a volume but volumes don't support chmod/chown AFAICT so if your service is picky about that sort of thing then I don't know what you can do. |
Just hit this myself with two services where I need custom config files, one could get around by not using docker and installing the service globally as I will need it for other things but the other I can't as I need to use that service with different configuration setting. I'm still fairly new to using docker so I'm a little confused as to how to get around this other than ditching docker and running the services outside of containers with different config files as and when required, which feels wrong. So re-reading the above is this a fair summary
|
As a workaround one can use docker-compose.override.yml to extend the docker-compose.yml bind mounting the config file (given it's available as local file) in the service's volume section. Still: No template-driver available though. Simplified example:
docker-compose.override.yml
|
sample config
returns
WARNING: Some services (php) use the 'configs' key, which will be ignored. Compose does not support 'configs' configuration - use
docker stack deployto deploy to a swarm.
The text was updated successfully, but these errors were encountered: