Skip to content

ruibinx/docker.el

 
 

Repository files navigation

MELPA MELPA Stable

docker.el

Installation

The recommended way to install docker.el is through MELPA.

Quickstart

Use M-x docker-images, M-x docker-containers, M-x docker-volumes, M-x docker-networks or M-x docker-machines then mark/unmark items using the following keybindings:

Keymap Description
m Mark item
U Unmark all
u Unmark item
t Toggle marks
s Sort
< Shrink column
> Enlarge column
C-c C-e Export to csv
* r Mark items by regexp

Press ? to known about available keybindings in order to run actions on these items. Also check out https://github.com/politza/tablist to find more about the marking possibilities.

You can also call the API directly.

Configuration

OSX / docker-machine

The following configuration is required (some of it can probably be simplified by using https://github.com/purcell/exec-path-from-shell).

(setenv "PATH" (concat (getenv "PATH") ":/usr/local/bin"))
(setq exec-path (append exec-path '("/usr/local/bin")))
;; Use "docker-machine env box" command to find out your environment variables
(setenv "DOCKER_TLS_VERIFY" "1")
(setenv "DOCKER_HOST" "tcp://10.11.12.13:2376")
(setenv "DOCKER_CERT_PATH" "/Users/foo/.docker/machine/machines/box")
(setenv "DOCKER_MACHINE_NAME" "box")

Screenshots

images

docker.el screenshot

Commands

docker-global-mode

Running M-x docker-global-mode creates keybindings to the various docker api. The keymap prefix is C-c d by default and can be changed with M-x customize-variable docker-keymap-prefix.

API

WARNING This keymap is likely to change or be removed soon.

command keymap description
docker-images C-c d i i list images
docker-rmi C-c d i d delete image
docker-pull C-c d i f pull image
docker-push C-c d i p push image
docker-run C-c d i r run image
docker-containers C-c d c c list containers
docker-rm C-c d c d delete container
docker-stop C-c d c o stop container
docker-pause C-c d c p pause container
docker-kill C-c d c k kill container
docker-restart C-c d c r restart container
docker-start C-c d c s start container
docker-unpause C-c d c u unpause container
docker-volumes C-c d v v list volumes
docker-volume-rm C-c d v d delete volume
docker-networks C-c d n n list networks
docker-network-rm C-c d n d delete network
dockerfile-build-buffer C-c d B Build Dockerfile

docker-images

M-x docker-images lists the docker images. After having selected some images, you can do the following actions:

  • F: pull
  • P: push
  • D: rmi
  • R: run
  • I: inspect
  • T: tag

docker-containers

Running M-x docker-containers lists the docker containers. After having selected some containers, you can do the following actions:

  • S: start
  • O: stop
  • R: restart
  • P: pause/unpause
  • I: inspect
  • L: logs
  • C: cp
  • D: rm
  • K: kill
  • d: diff
  • f: find-file
  • b: shell
  • r: rename

docker-volumes

Running M-x docker-volumes lists the docker volumes. After having selected some volumes, you can do the following actions:

  • D: rm

docker-networks

Running M-x docker-networks lists the docker networks. After having selected some networks, you can do the following actions:

  • D: rm

docker-machines

Running M-x docker-machines lists the docker machines. After having selected some machines, you can do the following actions:

  • C: create
  • S: start
  • E: env
  • O: stop
  • R: restart
  • D: rm

Contributions welcome!

Either as suggestions or as pull requests by opening tickets on the issue tracker.

About

Manage docker from Emacs.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Emacs Lisp 100.0%