当前位置: 首页 > 软件库 > 云计算 > >

docker.el

Manage docker from Emacs.
授权协议 Readme
开发语言 Java
所属分类 云计算
软件类型 开源软件
地区 不详
投 递 者 宇文嘉勋
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

MELPAMELPA Stable

docker.el

Emacs integration for Docker!

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

Screenshots

List images

Image run

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 moremarking 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 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 dired or open a file inside a container or volume.

Customizations

Thanks to transient, all the transients arguments can be set temporarily orpermanently. See https://magit.vc/manual/transient/Saving-Values.html#Saving-Values for more information.

There are also hidden items (e.g on M-x docker where you could specify the host or TLS settings), seehttps://magit.vc/manual/transient/Enabling-and-Disabling-Suffixes.html for more information.

Here is a list of other customizations you can set:

Variable Description Default
docker-command The binary to use docker
docker-container-columns Columns definition for containers /bin/sh
docker-container-default-sort-key Sort key for containers ("Image")
docker-container-shell-file-name Shell to use when entering containers /bin/sh
docker-image-columns Columns definition for images Too complex to show
docker-image-default-sort-key Sort key for images ("Repository")
docker-machine-columns Columns definition for machines Too complex to show
docker-machine-default-sort-key Sort key for machines ("Name")
docker-network-columns Columns definition for networks Too complex to show
docker-network-default-sort-key Sort key for networks ("Name")
docker-run-as-root Run docker as root nil
docker-run-default-args Base arguments to use for docker run ("-i" "-t" "--rm")
docker-volume-columns Columns definition for volumes Too complex to show
docker-volume-default-sort-key Sort key for volumes ("Driver")

Changing the Default Arguments for docker run

You can match on the repository name for an image to customize the initial infix arguments via docker-image-run-custom-args:

(add-to-list
   'docker-image-run-custom-args
   `("^postgres" ("-e POSTGRES_PASSWORD=postgres" . ,docker-run-default-args)))

So when docker run is called on an image whose repository name matches the regular expression ^postgres, the option "-e POSTGRES_PASSWORD=postgres" will appear as set along with the defaults specified by docker-run-default-args.

FAQ

How to use docker-machine under OSX / MacOS?

The following configuration is required (some of it can probably be simplified by usinghttps://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")

This is necessary and useful if you use docker-machine.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.

Contributions

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

  • 下载 # 拉取 ELK + Filebeat docker pull docker.elastic.co/elasticsearch/elasticsearch:7.6.1 docker pull docker.elastic.co/kibana/kibana:7.6.1 docker pull docker.elastic.co/logstash/logstash:7.6.1 docker pu

  • 1.卸载 yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine 2.安装工具 yum install -y yum-utils 3.设置Yum源 yum-config-manag

  • 换了个运行环境,重新搭建一套公司本地内部的ELK,之前也搭过(可访问:https://yanganlin.com/31.html),最近做什么事情都想用Docker,这次也用Docker,还算顺利,没掉什么坑里,上次搭建,也用用的6.2+的版本,这都过了一年,Elk这三个产品,都已经上7了,用docker搭建的还是用6.2.4,稳定不落伍就好 安装elasticsearch 安装 docker r

  • version: '3.1' services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4 container_name: elasticsearch ports: - "9200:9200" volumes: - elasticsearch-data:/usr

  • Docker - ELK 的安装 1、设置服务器虚拟内存连续堆大小 # 设置 sysctl -w vm.max_map_count=262144 # 查看 sysctl -a | grep vm.max_map_count 参考 官方文档 1 官方文档 2

  • 拉取相关镜像,版本号尽量一致 docker pull docker.elastic.co/elasticsearch/elasticsearch:7.14.0 docker pull docker.elastic.co/logstash/logstash:7.14.0 docker pull docker.elastic.co/kibana/kibana:7.14.0 建好文件夹 安装 Elas

  • Docker启动Elasticsearch 拉取镜像 docker pull elasticsearch:7.4.2 修改配置文件 mkdir -p /mydata/elasticsearch/config mkdir -p /mydata/elasticsearch/data/ mkdir -p /mydata/elasticsearch/plugins echo "http.host: 0.0

  • version: "3.3" services: elasticsearch: image: elasticsearch:7.17.1 container_name: elasticsearch ports: - "9200:9200" - "9300:9300" networks: - elastic

相关阅读

相关文章

相关问答

相关文档