Code Monkey home page Code Monkey logo

docker.el's Introduction

MELPA MELPA Stable

docker.el

Emacs integration for Docker!

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

Screenshots

List images

Images list

Image run popup

Image run popup

Installation

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))

Quickstart

Use M-x docker, select a resource then then mark or unmark items using the following keybindings (for more marking possibilities, check out https://github.com/politza/tablist):

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 popup 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, create, down, exec, logs, pull, push, remove, restart, run, start, stop, up

You can also enter dired or open a file inside a container or volume.

Customizations

Popups

Thanks to magit-popup, all the popups default arguments can be customized. For example, here is how to customize the arguments for docker-image-run-popup:

(setq docker-image-run-arguments '("-i" "-t" "--rm"))

or inside a use-package declaration:

(use-package docker
  :ensure t
  :bind ("C-c d" . docker)
  :custom (docker-image-run-arguments '("-i" "-t" "--rm")))

You can also customize these using M-x customize-variable.

Others

Variable Description Default
docker-command The docker binary to use. Podman is also supported docker
docker-container-default-sort-key Sort key for docker containers ("Image")
docker-container-shell-file-name Shell to use when entering containers /bin/bash
docker-image-default-sort-key Sort key for docker images ("Repository")
docker-machine-default-sort-key Sort key for docker machines ("Name")
docker-network-default-sort-key Sort key for docker networks ("Name")
docker-run-as-root Run docker as root nil
docker-volume-default-sort-key Sort key for docker volumes ("Driver")

FAQ

How to use docker-machine under OSX?

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")

Contributions

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

docker.el's People

Contributors

benswift avatar dakra avatar in3d avatar ksjogo avatar masven avatar mprokopov avatar novakboskov avatar ruibinx avatar silex avatar syohex avatar take-cheeze avatar tzz avatar yuki-inoue avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.