by Silex

Silex / docker.el

Manage docker from Emacs.

477 Stars 48 Forks Last release: Not found 297 Commits 16 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:



Emacs integration for Docker!

Supports docker containers, images, volumes, networks, docker-machine and docker-compose.


List images

Images list

Image run

Image run


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

Here is a example use-package configuration:

(use-package docker
  :ensure t
  :bind ("C-c d" . docker))


Use M-x docker, select a resource then then mark or unmark items using the following keybindings (for more marking possibilities, check out

| Binding | Description | |--------------------|----------------------| | ? | List actions | | l | Configure listing | | m | Mark item | | u | Unmark item | | t | Toggle marks | | U | Unmark all | | s | Sort | | * r | Mark items by regexp | | < | Shrink column | | > | Enlarge column | | C-c C-e | Export to csv |

Then select an action and follow the instructions.

Supported commands

  • docker container: attach, cp, diff, inspect, kill, logs, pause, rename, restart, rm, start, stop, unpause
  • docker image: inspect, pull, push, rm, run, tag
  • docker network: rm
  • docker volume: rm
  • docker-machine: create, env, restart, rm, start, stop
  • docker-compose: build, config, create, down, exec, logs, pull, push, remove, restart, run, start, stop, up

You can also enter

or open a file inside a container or volume.


Thanks to transient, all the transients arguments can be set temporarily or permanently. See for more information.

There are also hidden items (e.g on

M-x docker
where you could specify the host or TLS settings), see for more information.

Here is a list of other customizations you can set:

| Variable | Description | Default | |-----------------------------------|---------------------------------------|------------------| | docker-command | The docker binary to use |

| | docker-container-default-sort-key | Sort key for docker containers |
| | docker-container-shell-file-name | Shell to use when entering containers |
| | docker-image-default-sort-key | Sort key for docker images |
| | docker-machine-default-sort-key | Sort key for docker machines |
| | docker-network-default-sort-key | Sort key for docker networks |
| | docker-run-as-root | Run docker as root |
| | docker-volume-default-sort-key | Sort key for docker volumes |


How to use docker-machine under OSX / MacOS?

The following configuration is required (some of it can probably be simplified by using

(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://")
(setenv "DOCKER_CERT_PATH" "/Users/foo/.docker/machine/machines/box")
(setenv "DOCKER_MACHINE_NAME" "box")

This is necessary and useful if you use

. Notice though that there is also a native MacOS Docker implementation (now called Docker Desktop) which does not depend on VirtualBox and which does not require these tweaks.


They are very welcome, either as suggestions or as pull requests by opening tickets on the issue tracker.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.