.. | ||
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
For syntax checking the external library hadolint is necessary.
LSP
This layer can be used with dockerfile-language-server-nodejs
and emacs
lsp-mode
to provide richer, IDE-like capabilities.
To use this layer with lsp, you must do the following:
- Add
lsp
todotspacemacs-configuration-layers
. -
Install
dockerfile-language-server-nodejs
package with:npm i -g dockerfile-language-server-nodejs
- Enable layer integration with lsp as described in section below.
Options
This layer also includes experimental support for lsp-mode
. To enable language
server functionality with this layer, follow the instructions for installation,
and then install this layer with:
(setq-default dotspacemacs-configuration-layers
'((docker :variables docker-dockerfile-backend 'lsp)))
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 D c |
list docker containers |
SPC a D C |
docker-compose commands for current project |
SPC a D d |
delete image |
SPC a D e |
unpause container |
SPC a D F |
pull image |
SPC a D i |
list docker images |
SPC a D k |
delete container |
SPC a D o |
stop container |
SPC a D p |
pause container |
SPC a D P |
push image |
SPC a D r |
restart container |
SPC a D s |
start container |