Is it possible to get syntax highlighting for a Dockerfile in Sublime Text?
5 Answers
Of course you can, by installing this package from Package Control:
- Dockerfile Syntax Highlighting, https://packagecontrol.io/packages/Dockerfile%20Syntax%20Highlighting
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!
-
FYI, these instructions are for Sublime Text 3. Instructions for 4 are in the answer below: stackoverflow.com/a/71745393/482115 Commented Mar 7, 2023 at 14:29
4 Steps
Press command + shift + p to open the 'Command Palette'.
Search: package control: install package (you may have to install it first if you haven't yet)
Then search: dockerfile syntax highlighting
Close and re-open your Dockferfile, it will be syntax highlighted.
-
1
For Mac, Dockerfile extension for sublime Text editor:-
Steps:-
- Press cmd(⌘)+shift+p and type "add repo".
- 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.
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.
-
1Your answer is unrelated to the question, maybe you replied to the wrong thread? Commented Mar 7, 2023 at 14:31