Configuring Your Code Editor for Docker

blog/cards/configuring-your-code-editor-for-docker.jpg

Learn how to get syntax highlighting and more with Docker related files for Sublime Text 3, VSCode, Atom, Emacs and Vim.

Quick Jump: Sublime Text 3 | VSCode | Atom | Emacs | Vim

I’m not a fan of “settling”, and when it comes to editing code or config files I want my code editor to be the best it can be for what I use it for.

When it comes to Docker support in code editors, I would expect good syntax highlighting for a Dockerfile but it’s also nice to have good support for YAML files as well as ENV files because in any real world Docker project, you’re likely going to use Docker Compose and .env files.

 

Sublime Text 3


Dockerfile Syntax Highlighting
https://github.com/asbjornenge/Docker.tmbundle
YAML Syntax Highlighting
There's already great YAML support built in
DotENV
https://github.com/zaynali53/DotENV

 

VSCode


Docker Extension (Syntax Highlighting and more)
https://marketplace.visualstudio.com/items?itemName=PeterJausovec.vscode-docker
DotENV
https://marketplace.visualstudio.com/items?itemName=mikestead.dotenv

 

Atom


Dockerfile Syntax Highlighting
https://atom.io/packages/language-docker
YAML Syntax Highlighting
There's already great YAML support built in
DotENV
https://atom.io/packages/language-dotenv

 

Emacs


Dockerfile Syntax Highlighting
https://github.com/spotify/dockerfile-mode
YAML Syntax Highlighting
https://github.com/yoshiki/yaml-mode
DotENV
https://gist.github.com/preetpalS/54acec3f166393f1d9e55380e1df7364

 

Vim


Dockerfile Syntax Highlighting
https://github.com/ekalinin/Dockerfile.vim
YAML Syntax Highlighting
https://github.com/stephpy/vim-yaml
DotENV
https://github.com/tpope/vim-dotenv

 

Did I miss something useful for working with Docker in your favorite code editor? Let me know in the comments below.

Free Intro to Docker Email Course

Over 5 days you'll get 1 email per day that includes video and text from the premium Dive Into Docker course. By the end of the 5 days you'll have hands on experience using Docker to serve a website.


Comments