Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Syntax highlighting for Dockerfile in Sublime Text?

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

like image 381
Ben Harrison Avatar asked Aug 19 '16 15:08

Ben Harrison


3 Answers

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

  • Dockerfile Syntax Highlighting, https://packagecontrol.io/packages/Dockerfile%20Syntax%20Highlighting
like image 102
alebianco Avatar answered Nov 12 '22 23:11

alebianco


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!
like image 16
ghazouan badr Avatar answered Nov 12 '22 23:11

ghazouan badr


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.

like image 3
stevec Avatar answered Nov 12 '22 23:11

stevec