branch: elpa/dockerfile-mode
commit ed73e82dcc636dad00d1a8c3b32a49136d25ee60
Author: Sven Marquardt <[email protected]>
Commit: Drew Csillag <[email protected]>

    Added support to bin to different binary than path binary
    
    Signed-off-by: Sven Marquardt <[email protected]>
---
 README.md          | 5 +++++
 dockerfile-mode.el | 8 +++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 88e40ecb8a..9785a058fe 100644
--- a/README.md
+++ b/README.md
@@ -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")
+```
diff --git a/dockerfile-mode.el b/dockerfile-mode.el
index 9c9f61ec7e..ab93fb6860 100644
--- a/dockerfile-mode.el
+++ b/dockerfile-mode.el
@@ -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)

Reply via email to