51

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

1
  • 1
    Not the best answer but: atom.io has a plugin for Dockerfiles Commented Aug 19, 2016 at 15:51

5 Answers 5

42

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

17

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!
1
11

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.

1
  • 1
    FYI, these instructions are for Sublime Text 4
    – degenerate
    Commented Mar 7, 2023 at 14:28
0

For Mac, Dockerfile extension for sublime Text editor:-

Steps:-

  1. Press cmd(⌘)+shift+p and type "add repo".
  2. Paste in the GitHub address for this package: https://github.com/jaytaylor/Dockerfile.sublime-syntax
  3. Press cmd(⌘)+shift+p and type "install".
  4. Enter "Dockerfile.sublime-syntax" and press enter.
-2

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.

1
  • 1
    Your answer is unrelated to the question, maybe you replied to the wrong thread?
    – degenerate
    Commented Mar 7, 2023 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.