branch: elpa/dockerfile-mode
commit 27a9f4d2f3cfcc4188955f27d1945850d850aed1
Author: fredeb <[email protected]>
Commit: Drew Csillag <[email protected]>
Added the option to use docker buildkit
---
dockerfile-mode.el | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/dockerfile-mode.el b/dockerfile-mode.el
index f48fac97c7..ffa79d5f4b 100644
--- a/dockerfile-mode.el
+++ b/dockerfile-mode.el
@@ -59,6 +59,15 @@ Each element of the list will be passed as a separate
:type '(repeat string)
:group 'dockerfile)
+(defcustom dockerfile-use-buildkit nil
+ "If t use Docker buildkit for building images
+
+This is the new buildsystem for docker, and in time it will replace the old one
+but for now it has to be explicitly enabled to work.
+It is supported from docker 18.09"
+ :type 'boolean
+ :group 'dockerfile)
+
(defface dockerfile-image-name
'((t (:inherit (font-lock-type-face bold))))
"Face to highlight the base image name after FROM instruction.")
@@ -176,7 +185,8 @@ The build string will be of the format:
(save-buffer)
(compilation-start
(format
- "%s%s build %s %s %s -f %s %s"
+ "%s%s%s build %s %s %s -f %s %s"
+ (if dockerfile-use-buildkit "DOCKER_BUILDKIT=1 " "")
(if dockerfile-use-sudo "sudo " "")
dockerfile-mode-command
(if no-cache "--no-cache" "")