Skip to content
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

Allow an 'extra' top-level element in config files. #4461

Closed
wants to merge 1 commit into from

Conversation

tbeadle
Copy link

@tbeadle tbeadle commented Feb 10, 2017

This allows writers of docker-compose.yml files to factor out repeated
bits of configuration to be under an 'extra' top-level key, allowing the
use of yml anchors.

Signed-off-by: Tommy Beadle tbeadle@gmail.com

This allows writers of docker-compose.yml files to factor out repeated
bits of configuration to be under an 'extra' top-level key, allowing the
use of yml anchors.

Signed-off-by: Tommy Beadle <tbeadle@gmail.com>
tbeadle added a commit to tbeadle/docker.github.io that referenced this pull request Feb 10, 2017
Refers to change proposed in docker/compose#4461

Signed-off-by: Tommy Beadle <tbeadle@gmail.com>
@shin-
Copy link

shin- commented Feb 22, 2017

First of all, thank you for contributing to the project!

This was proposed some time ago in #2578 - now we have an actual implementation. This looks simple enough and non-intrusive. It would probably require an update in docker/docker as well.

You'll need to remove the change from the 3.0 format as it is now frozen.

cc @dnephin I know you were hesitant in the past about such a feature, do you have any new thoughts on this?

@tbeadle
Copy link
Author

tbeadle commented Feb 23, 2017

@shin I figured it could be included in all of the formats 2.0 and greater because it's backwards compatible. What would be required to be changed in docker/docker? I didn't think any of the changes here would impact that at all.

@dnephin
Copy link

dnephin commented Feb 23, 2017

I'm fine with supporting "extra" sections, but I think something like this is more common:

    "patternProperties": {
        "x-.+": {}
    },

docker/docker now reads Compose files for stack deploy, so the change needs to be supported by both.

@JanNash
Copy link

JanNash commented May 12, 2017

Since version 3 is frozen and I needed a way to share common configuration, I hacked a small workaround, which I think I could share here (I'm not sure if this is the right place but feel free to tell me where else I can share this info :))

I'm not going to elaborate on it here, since there's a readme in the repo.
Have a nice one, everyone ☮️

@tbeadle
Copy link
Author

tbeadle commented Aug 19, 2017

Closing this in favor of docker/cli#452

@tbeadle tbeadle closed this Aug 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants