spotify / Dockerfile Mode
Licence: apache-2.0
An emacs mode for handling Dockerfiles
Stars: ✭ 406
dockerfile-mode
Known to work with Emacs 24 and later
If you just want to use it, you can get it via MELPA.
A Dockerfile mode for emacs
(add-to-list 'load-path "/your/path/to/dockerfile-mode/")
(require 'dockerfile-mode)
(add-to-list 'auto-mode-alist '("Dockerfile\\'" . dockerfile-mode))
Adds syntax highlighting as well as the ability to build the image directly (C-c C-b) from the buffer.
You can specify the image name in the file itself by adding a line like this at the top of your Dockerfile.
## -*- docker-image-name: "your-image-name-here" -*-
If you don't, you'll be prompted for an image name each time you build. You may want to add the following to your emacs config:
(put 'docker-image-name 'safe-local-variable #'stringp)
You can change the binary to use with
(setq dockerfile-mode-command "docker")
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].