2016-06-10 03:53:33 +00:00
|
|
|
;;; packages.el --- docker Layer packages File for Spacemacs
|
2015-11-08 10:38:23 +00:00
|
|
|
;;
|
2021-03-22 20:11:29 +00:00
|
|
|
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
|
2015-11-08 10:38:23 +00:00
|
|
|
;; Copyright (c) 2015 Alan Zimmerman & Contributors
|
|
|
|
;;
|
|
|
|
;; Author: Alan Zimmerman <alan.zimm@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
2016-06-10 03:53:33 +00:00
|
|
|
(defconst docker-packages
|
2015-11-08 10:38:23 +00:00
|
|
|
'(
|
|
|
|
docker
|
2016-06-10 03:46:10 +00:00
|
|
|
docker-tramp
|
|
|
|
dockerfile-mode
|
2019-11-10 05:53:44 +00:00
|
|
|
flycheck
|
2015-11-08 10:38:23 +00:00
|
|
|
))
|
|
|
|
|
2016-06-10 03:53:33 +00:00
|
|
|
(defun docker/init-docker ()
|
2016-06-10 03:46:10 +00:00
|
|
|
(use-package docker
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2016-06-10 03:46:10 +00:00
|
|
|
:init
|
|
|
|
(progn
|
2020-06-21 22:04:52 +00:00
|
|
|
(spacemacs/declare-prefix "atd" "Docker")
|
2016-06-10 03:46:10 +00:00
|
|
|
(evil-leader/set-key
|
2020-06-21 22:04:52 +00:00
|
|
|
"atdc" 'docker-containers
|
|
|
|
"atdC" 'docker-compose
|
|
|
|
"atdd" 'docker-rmi
|
|
|
|
"atde" 'docker-unpause
|
|
|
|
"atdF" 'docker-pull
|
|
|
|
"atdk" 'docker-rm
|
|
|
|
"atdi" 'docker-images
|
|
|
|
"atdm" 'docker-machines
|
|
|
|
"atdn" 'docker-networks
|
|
|
|
"atdo" 'docker-stop
|
|
|
|
"atdP" 'docker-push
|
|
|
|
"atdp" 'docker-pause
|
|
|
|
"atdr" 'docker-restart
|
|
|
|
"atds" 'docker-start
|
|
|
|
"atdv" 'docker-volumes)))
|
2016-06-13 12:48:26 +00:00
|
|
|
(with-eval-after-load 'docker-containers
|
|
|
|
(evilified-state-evilify-map docker-containers-mode-map
|
|
|
|
:mode docker-containers-mode))
|
|
|
|
(with-eval-after-load 'docker-images
|
|
|
|
(evilified-state-evilify-map docker-images-mode-map
|
|
|
|
:mode docker-images-mode)))
|
2015-11-08 10:38:23 +00:00
|
|
|
|
2016-06-10 03:53:33 +00:00
|
|
|
(defun docker/init-docker-tramp ()
|
2015-11-08 10:38:23 +00:00
|
|
|
(use-package docker-tramp
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t))
|
2015-11-08 10:38:23 +00:00
|
|
|
|
2016-06-10 03:53:33 +00:00
|
|
|
(defun docker/init-dockerfile-mode ()
|
2018-01-27 12:15:04 +00:00
|
|
|
(use-package dockerfile-mode
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2019-12-01 01:03:30 +00:00
|
|
|
:init (add-hook 'dockerfile-mode-local-vars-hook #'spacemacs//docker-dockerfile-setup-backend)
|
2018-01-27 12:15:04 +00:00
|
|
|
:config
|
2019-12-01 01:03:30 +00:00
|
|
|
(spacemacs/declare-prefix-for-mode 'dockerfile-mode "mc" "compile")
|
|
|
|
(spacemacs/set-leader-keys-for-major-mode 'dockerfile-mode
|
|
|
|
"cb" 'dockerfile-build-buffer
|
|
|
|
"cB" 'dockerfile-build-no-cache-buffer)))
|
2019-11-10 05:53:44 +00:00
|
|
|
|
|
|
|
(defun docker/post-init-flycheck ()
|
|
|
|
(spacemacs/enable-flycheck 'dockerfile-mode))
|