5a6f54c227
- Replaced `pcase` form with only one-arm with `when` or `unless` form |
||
---|---|---|
.. | ||
img | ||
config.el | ||
funcs.el | ||
layers.el | ||
packages.el | ||
README.org |
Docker layer
Description
This layer integrates basic container management into Spacemacs.
Install
Docker
To use this configuration layer, add it to your ~/.spacemacs
. You will need to
add docker
to the existing dotspacemacs-configuration-layers
list in this
file.
You will also need the native package Docker for the actual container management.
Linting
LSP
This layer can be enhanced with dockerfile-language-server-nodejs
and emacs
lsp-mode
to provide richer, IDE-like capabilities.
To do so set the layer variable docker-dockerfile-backend
to lsp
like shown below:
(setq-default dotspacemacs-configuration-layers
'((docker :variables docker-dockerfile-backend 'lsp)))
In addition you need to install the lsp server's executable in your system. This can be done via npm:
npm i -g dockerfile-language-server-nodejs
Usage
TRAMP access to docker containers
This relies on the docker-tramp package which uses docker exec
available in
docker versions > 1.3.
docker-tramp
adds a new prefix /docker:
that you can use with SPC f f
,
this prefix allows to access your docker containers and also provides
auto-completion of the running containers.
Key bindings
Key binding | Description |
---|---|
SPC m c b |
build current buffer |
SPC m c B |
build current buffer without cache |
SPC a t d c |
list docker containers |
SPC a t d C |
docker-compose commands for current project |
SPC a t d d |
delete image |
SPC a t d e |
unpause container |
SPC a t d F |
pull image |
SPC a t d i |
list docker images |
SPC a t d k |
delete container |
SPC a t d o |
stop container |
SPC a t d p |
pause container |
SPC a t d P |
push image |
SPC a t d r |
restart container |
SPC a t d s |
start container |