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

Map keys must be unique (DUPLICATE_KEY) on anchors #78

Closed
Zayon opened this issue Jan 5, 2022 · 1 comment · Fixed by #79
Closed

Map keys must be unique (DUPLICATE_KEY) on anchors #78

Zayon opened this issue Jan 5, 2022 · 1 comment · Fixed by #79
Labels
bug Something isn't working

Comments

@Zayon
Copy link

Zayon commented Jan 5, 2022

The following yaml is a valid docker-compose.yaml declaration but vscode shows a "Map keys must be unique (DUPLICATE_KEY)" error on the <<: *bar line.

version: 3.8

x-foo: &foo
  FOO: FOO

x-bar: &bar
  BAR: BAR

services:
  foo-bar:
    image: my-image
    environment:
      <<: *foo
      <<: *bar

Disabling the docker extension ms-azuretools.vscode-docker make the error disappear.

This issue is fixed in the YAML parser, see eemeli/yaml#21

@bwateratmsft
Copy link
Contributor

Thanks for the report! You can disable just the Compose language server by setting the docker.enableDockerComposeLanguageService setting in VSCode to false, this will have less impact than disabling the extension entirely. You probably can also just ignore the error.

@bwateratmsft bwateratmsft added the bug Something isn't working label Jan 5, 2022
@microsoft microsoft locked and limited conversation to collaborators Feb 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants