8

The aim is to get docker syntax support in vscode. In order to achieve this, the docker plugin was installed, but it turns out that only Dockerfile and docker-compose are seen as docker files, but the the repository contains .docker files. Would it be possible to mark .docker files as dockerfiles in vcsode?

Example

In this example the someimage.docker should be marked as docker so that a docker icon would appear like the icon that is put in front of the Dockerfile. When the file is opened, there should be docker syntax support.

enter image description here

Attempt to solve the issue

The first attempt to solve the issue was consulting the settings, but it does not seem to be possible to associated certain extensions with the docker format.

030
  • 10,842
  • 12
  • 78
  • 123

1 Answers1

11

Basically set the files.associations setting in the settings.json file.

{
  "files.associations": {
        "*.docker": "dockerfile"
    }
}

You can use the "dockerfile" language identifier.

Ropstah
  • 17,538
  • 24
  • 120
  • 194