How to use Dockerfile syntax highlight with `Dockerfile.production` and `Dockerfile.staging`
Hi there, I'm using Docker to setup a private image. The image will have different version based on the environment. To achive this workflow I've named the Dockerfile for production environment `Dockerfile.production` but I could not find the proper Docker syntax highlight. Maybe it's just not named Docker, but it's taken from anbother syntax highligher. I don't know.
Does anyone know how to get Dockerfile syntax highlight on the `Dockerfile.production` and `Dockerfile.staging`?
请先登录再写评论。
Try adding both names to the list of patterns registered for Dockerfile file type in Settings | Editor | File Types:
Amazing. It was exactly what I was looking for, just didn't know where it was. Thanks!
Btw why do this rule not working for highlighting in some cases?


@Alex
Check entries for "Text" file type -- you may have an exact match entry there already... if so -- remove it.
In version 2021.1.2 there is no Dockerfile type in Settings | Editor | File Types. Was it removed?
@Marcin
It is there for me in PhpStorm 2021.1.3
Make sure that Docker plugin is enabled. If that plugin is disabled then the File Type entry is absent.
@Andriy
You are right, I missed that part. Thanks!