Added support to bin to different binary than path binary

Signed-off-by: Sven Marquardt <sven.marquardt@mail.smarquardt.space>
pull/51/head
Sven Marquardt 2019-04-13 09:34:21 +02:00 committed by Drew Csillag
parent 7223d92718
commit ed73e82dcc
2 changed files with 12 additions and 1 deletions

View File

@ -28,3 +28,8 @@ You may want to add the following to your emacs config:
``` emacs-lisp
(put 'dockerfile-image-name 'safe-local-variable #'stringp)
```
You can change the binary to use with
```emacs-lisp
(setq dockerfile-mode-command "docker")
```

View File

@ -42,6 +42,11 @@
:type 'hook
:group 'dockerfile)
(defcustom dockerfile-mode-command "docker"
"Which binary to use to build images"
:group 'dockerfile
:type 'string)
(defcustom dockerfile-use-sudo nil
"Runs docker builder command with sudo."
:type 'boolean
@ -165,8 +170,9 @@ If prefix arg NO-CACHE is set, don't cache the image."
(if (stringp image-name)
(compilation-start
(format
"%sdocker build %s -t %s %s -f %s %s"
"%s%s build %s -t %s %s -f %s %s"
(if dockerfile-use-sudo "sudo " "")
dockerfile-mode-command
(if no-cache "--no-cache" "")
(shell-quote-argument image-name)
(dockerfile-build-arg-string)