'Syntax highlighting for Dockerfile in Sublime Text?

Is it possible to get syntax highlighting for a Dockerfile in Sublime Text?



Solution 1:[1]

Of course you can, by installing this package from Package Control:

Solution 2:[2]

for mac

Press cmd(?)-shift-p and type "add repo".
Then paste in the GitHub address for this package:

https://github.com/jaytaylor/Dockerfile.sublime-syntax

Press cmd(?)-shift-p and type "install".
Enter "Dockerfile.sublime-syntax" and press enter.

for windows

the same just replace cmd(?) with Ctrl
Now you're all set! Enjoy!

Solution 3:[3]

4 Steps

  1. Press command + shift + p to open the 'Command Palette'.

  2. Search: package control: install package (you may have to install it first if you haven't yet)

  3. Then search: dockerfile syntax highlighting

  4. Close and re-open your Dockferfile, it will be syntax highlighted.

Solution 4:[4]

If anyone has same issue, in the docker-compose file, you can append the lower_case_table_names config to the mysql command.

mysql:
    image: mysql:8
    container_name: shiftmonitor_mysql
    command: mysqld --lower_case_table_names=0

And it works.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 jso
Solution 2 ghazouan badr
Solution 3
Solution 4 Arghya Sadhu