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

[BUG] Conflict with Docker Extension Prevents Formatting of docker-compose.yaml and Dockerfile #1000

Open
LisonFan opened this issue Dec 30, 2023 · 5 comments

Comments

@LisonFan
Copy link

Hello,

I am experiencing an issue where the installation of the YAML extension seems to interfere with the Docker extension's ability to format docker-compose.yaml and Dockerfile.

Describe the bug

After installing the YAML extension, the Docker extension (ms-azuretools.vscode-docker) can no longer format docker-compose.yaml and Dockerfile. An error message is displayed: "No formatter installed for 'dockerfile/dockercompose' files." This issue does not occur until the YAML extension is installed, suggesting a conflict between the two extensions.
image
image
image

Steps to Reproduce

  1. Ensure the Docker extension from Microsoft is installed and functioning correctly: ms-azuretools.vscode-docker
  2. Install the YAML extension.
  3. Open a docker-compose.yaml or Dockerfile.
  4. Attempt to format the file using VSCode's Format Document feature.

Environment

  • VSCode Version: 1.85.1
  • OS: macOS Windows
  • Docker Extension Version: v1.28.0
  • YAML Extension Version: v1.14.0
@LisonFan LisonFan changed the title Conflict with Docker Extension Prevents Formatting of docker-compose.yaml and Dockerfile [BUG] Conflict with Docker Extension Prevents Formatting of docker-compose.yaml and Dockerfile Dec 30, 2023
@hexxone
Copy link

hexxone commented Feb 11, 2024

Bump
+1 Same issue, verry annoying, please fix

@XhmikosR
Copy link

XhmikosR commented Mar 2, 2024

@msivasubramaniaan sorry for pining you, could someone have a look at this issue please?

It's a deal breaker and has a serious impact on the developer experience. :/

@IvanLi-CN
Copy link

Does anyone have a solution? I have been manually formatting docker-compose.yml for a long time. 😭

@XhmikosR
Copy link

Unfortunately, no. This issue is so annoying but it seems the RedHat people are not actively maintaining this package.

If anyone has a contact with them please ping them.

@nilreml
Copy link

nilreml commented Apr 29, 2024

Workaround:

Add the following to your user or workspace settings.json:

"files.associations": {
    "docker-compose.y*ml": "yaml"
}

NOTE: In addition to Red Hat's yaml extension, I use remcohaszing.schemastore for automatic JSON schema validation in most yaml, json and toml files - no idea whether this works without.

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

No branches or pull requests

5 participants