8000 add raw credential_spec capability by Drewster727 · Pull Request #6844 · docker/compose · GitHub
[go: up one dir, main page]

Skip to content

Conversation

Drewster727
Copy link
@Drewster727 Drewster727 commented Aug 13, 2019

Resolves #6842

The docker cli supports passing in raw credential spec json instead of telling docker to find it in a file on the file system.
This is very useful because CI/CD tools that deploy these credential specs shouldn't have to ensure a specific file exists on every single host in the cluster, it makes more sense to be able to pull the cred spec at deployment time and allow the swarm/compose hosts to get the spec passed to them from a manager.

References:
moby/moby#38777
moby/moby#38632

This could allow going from:

version: "3.7"

services:
  cdm:
    image: mcr.microsoft.com/windows/servercore:servercore:ltsc2019
    credential_spec:
      file: cred-spec.json

To...

version: "3.7"

services:
  app:
    image: mcr.microsoft.com/windows/servercore:servercore:ltsc2019
    credential_spec:
       raw: "{ somejson: blah }"

This should work as-is, but I'd need someone else to give it a run as my dev environment is being quirky at the moment.

@GordonTheTurtle
Copy link

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "master" git@github.com:Drewster727/compose.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

Signed-off-by: Drew McMinn <drewm727@hotmail.com>
@Drewster727
Copy link
Author

One thing to note that I just realized. I did not add this to any config_schema files. I'm not sure if it belongs in 3.7 or 3.8 (which hasn't been merged yet) schema.

@glours
Copy link
Contributor
glours commented Jul 13, 2022

Thanks for taking the time to create this issue/pull request!

Unfortunately, Docker Compose V1 has reached end-of-life and we are not accepting any more changes (except for security issues). Please try and reproduce your issue with Compose V2 or rewrite your pull request to be based on the v2 branch and create a new issue or PR with the relevant Compose V2 information.

@glours glours closed this Jul 13, 2022
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.

Raw credential spec in compose yml

4 participants

0