Docker IDEA Plugins

1、修改docker.service配置文件开放Docker服务端口

  1. [root@iZuligp6e1dyzfZ ~]# vim /usr/lib/systemd/system/docker.service

image.png

2、系统服务重载配置文件以及测试开放的端口

  1. [root@iZuligp6e1dyzfZ ~]# systemctl daemon-reload
  2. [root@iZuligp6e1dyzfZ ~]# systemctl restart docker
  3. [root@iZuligp6e1dyzfZ ~]# ps -ef|grep docker
  4. root 7591 1 0 23:01 ? 00:00:00 /usr/bin/dockerd-current -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
  5. root 7596 7591 0 23:01 ? 00:00:00 /usr/bin/docker-containerd-current -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc
  6. root 7705 4965 0 23:02 pts/4 00:00:00 grep --color=auto docker
  7. [root@iZuligp6e1dyzfZ ~]# curl http://localhost:2375/version
  8. {"Version":"1.13.1","ApiVersion":"1.26","MinAPIVersion":"1.12","GitCommit":"64e9980/1.13.1","GoVersion":"go1.10.3","Os":"linux","Arch":"amd64","KernelVersion":"3.10.0-514.26.2.el7.x86_64","BuildTime":"2020-07-01T14:56:42.708555659+00:00","PkgVersion":"docker-1.13.1-162.git64e9980.el7.centos.x86_64"}

image.png

3、在系统环境变量配置Docker主机的连接信息

新建DOCKER_HOST变量,值为tcp://120.79.178.68:2375主机和Docker配置映射的端口
image.png

4、在IDEA的Docker进行配置连接

image.png

5、进入插件页面进行镜像和容器的管理操作

image.png