2015-11-08 10:38:23 +00:00
|
|
|
#+TITLE: Dockerfile contribution layer for Spacemacs
|
|
|
|
|
|
|
|
[[file:img/docker.png]]
|
|
|
|
|
|
|
|
* Table of Contents :TOC_4_org:noexport:
|
|
|
|
- [[Description][Description]]
|
|
|
|
- [[Install][Install]]
|
2016-06-10 03:46:10 +00:00
|
|
|
- [[TRAMP access to docker containers][TRAMP access to docker containers]]
|
2015-11-08 10:38:23 +00:00
|
|
|
- [[Key bindings][Key bindings]]
|
|
|
|
|
|
|
|
* Description
|
|
|
|
This layer provides syntax highlighting and build functionality for Docker files
|
|
|
|
as well as TRAMP access to running docker containers.
|
|
|
|
|
|
|
|
It also includes basic Docker container and image management provided by
|
|
|
|
[[https://github.com/Silex/docker.el][docker.el.]]
|
|
|
|
|
|
|
|
* Install
|
2016-06-10 03:46:10 +00:00
|
|
|
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.
|
2015-11-08 10:38:23 +00:00
|
|
|
|
2016-06-10 03:46:10 +00:00
|
|
|
** TRAMP access to docker containers
|
2015-11-08 10:38:23 +00:00
|
|
|
This relies on the [[https://github.com/emacs-pe/docker-tramp.el][docker-tramp]] package which uses ~docker exec~ available in
|
2016-06-10 03:46:10 +00:00
|
|
|
docker versions > 1.3.
|
2015-11-08 10:38:23 +00:00
|
|
|
|
2016-06-10 03:46:10 +00:00
|
|
|
=docker-tramp= adds a new prefix =/docker:= that you can use with ~SPC f f~,
|
|
|
|
this prefix allows to acces your docker containers and also provides
|
|
|
|
auto-completion of the running containers.
|
2015-11-08 10:38:23 +00:00
|
|
|
|
|
|
|
* Key bindings
|
|
|
|
|
|
|
|
| Key Binding | Description |
|
|
|
|
|-------------+----------------------------------------------------|
|
|
|
|
| ~SPC m c b~ | build current buffer via =dockerfile-build-buffer= |
|
|
|
|
| ~SPC D c~ | list docker containers |
|
|
|
|
| ~SPC D d~ | delete image |
|
2016-06-10 03:46:10 +00:00
|
|
|
| ~SPC D e~ | unpause container |
|
2015-11-08 10:38:23 +00:00
|
|
|
| ~SPC D F~ | pull image |
|
2016-06-10 03:46:10 +00:00
|
|
|
| ~SPC D i~ | list docker images |
|
|
|
|
| ~SPC D k~ | delete container |
|
|
|
|
| ~SPC D o~ | stop container |
|
|
|
|
| ~SPC D p~ | pause container |
|
2015-11-08 10:38:23 +00:00
|
|
|
| ~SPC D P~ | push image |
|
2016-06-10 03:46:10 +00:00
|
|
|
| ~SPC D r~ | restart container |
|
|
|
|
| ~SPC D s~ | start container |
|