文章目录
Docker图形化
一、Dcoker图形化工具介绍
Docker图形页面管理工具常用的,DockerUI、Portainer、Shipyard
DockerUI是Portainer的前身,这三个工具通过docker api来获取管理的资源信息
【docker 图形化官网】
二、Docker图形化的使用
【DockerUI】
轻量级图形页面管理之DockerUI
1)#搜索查看镜像常量(dockerui)
[root@hzl ~]# docker search dockerui
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
uifd/ui-for-docker A web interface for Docker, formerly known a… 107 [OK]
abh1nav/dockerui An updated version of crosbymichael/dockerui… 99 [OK]
kevan/dockerui Deprecated: Use uifd/ui-for-docker 15 [OK]
microbox/dockerui Trusted Automated dockerui image (16MB size) 8
madhavkobal/dockerui Docker Updated Version having Search, Pull, … 7
mgtsai/dockerui.base-xpra Provide base docker images for X application… 2
elegoev/dockerui dockerui image based on crosbymichael/docker… 1 [OK]
rediceli/dockerui Dockerui with nginx for basic auth 1
navionics/dockerui Docker UI 1 [OK]
devalih/dockerui To run : docker pull devalih/dockerui dock… 0
yungsang/dockerui Docker API Version: v1.8 UI Version: v0.4 Bu… 0
david510c/dockerui.base-xpra dockerui.base-xpra with Firefox 0 [OK]
winking/dockerui The latest DockerUI build, see https://githu… 0
bettse/dockerui Fork of crosbymichael/dockerui 0
pemcconnell/dockerui 0
bbdinc/dockerui A rebuild of the dockerui-with-auth 0
alexerm/dockerui-auth 0
cloudaku/dockerui 0 [OK]
drakin/dockerui 0
allincloud/dockerui 0 [OK]
c0710204/dockerui 0 [OK]
wansc/dockerui 0 [OK]
psychemedia/dockerui_patch 0
biibds/dockerui 0
levkov/dockerui dockerui 0
2)#选择风格进行拉取下载 (dockerui)
[root@hzl ~]# docker pull abh1nav/dockerui
Using default tag: latest
latest: Pulling from abh1nav/dockerui
Image docker.io/abh1nav/dockerui:latest uses outdated schema1 manifest format. Please upgrade to a schema2 image for better future compatibility. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
a3ed95caeb02: Pull complete
5d3df020ecd3: Pull complete
bebf5a3b4dfb: Pull complete
e4452c0fe72b: Pull complete
6167d9726b07: Pull complete
53ebae19a314: Pull complete
Digest: sha256:a9c6c5393f561a0f42f41cfa80572b666e745d9b419569c42bac1e5cf9ceda32
Status: Downloaded newer image for abh1nav/dockerui:latest
docker.io/abh1nav/dockerui:latest
3)#运行并启动dockerui容器(注意启动时指定参数: --privileged)
[root@hzl ~]# docker run -d --privileged --name dockerui -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock abh1nav/dockerui:latest
d9cfe33092d525075068b2dd4a50c3a0ad3b6d4c217163f48997803d137b0a7e
[root@docker ~]# docker ps |grep dockerui #查看启动状态
d9cfe33092d5 abh1nav/dockerui:latest "./dockerui" About a minute ago Up About a minute 0.0.0.0:9000->9000/tcp, :::9000->9000/tcp dockerui
ps :打开服务器的9000端口:(确保端口可以正常使用):firewall-cmd --permanent --zone = public --add-port = 9000 / tcpfirewall-cmd --reload
4)#使用浏览器查看或者使用本地进行访问
1》服务器测试连接: curl http://192.168.15.80:9000
[root@hzl ~]# curl http://192.168.15.80:9000
<!DOCTYPE html>
<html lang="en" ng-app="dockerui">
<head>
<meta charset="utf-8">
<title>DockerUI</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Michael Crosby crosbymichael.com">
<link href="assets/css/bootstrap.css" rel="stylesheet">
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
<link href="lib/jquery.gritter.css" rel="stylesheet">
<link href="css/app.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
2》使用浏览器访问:http://192.168.15.80:9000 ---->
【dockerui 安装成功】
【Shipyard】
轻量级图形页面管理之Shipyard
Shipyard使用Citadel集群管理工具包,简化对横跨多个主机的Docker容器集群进行管理。通过Web用户界面,你可以大致浏览相关信息,比如你的容器在使用多少处理器和内存资源、在运行哪些容器,还可以检查所有集群上的事件日志
1)#搜索镜像(Shipyard)
[root@hzl ~]# docker search shipyard
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
shipyard/shipyard Composable Docker Management 214
dockerclub/shipyard shipyard中文版,一个开源的容器管理平台 14
shipyard/docker-proxy 9
shipyard/shipyard-cli Command line interface for managing a Shipya… 4
shipyard/deploy 4
janeczku/shipyard-armv7 Shipyard Docker management for Raspberry Pi … 3
shipyard/rethinkdb 3
zanjs/shipyard-cn Shipyard中文版本 1 [OK]
shipyardrun/ingress 0
isaacdaniel/shipyard-users Registers users by email, assigns random pwd… 0
keptn/shipyard-controller 0
tnine/shipyard 0
keptn/shipyard-service 0
shipyardrun/connector 0
shipyardrun/docker-registry-proxy 0
shipyardlabs/ferryman-prod 0
shipyardrun/tools 0
pavelgopanenko/shipyard-data Shipyard data volume stub 0 [OK]
shipyardrun/docs 0
shipyardrun/nomad 0
shipyardlabs/spark-driver-py 0
shipyardrun/k3s 0
shipyardsuite/microservice-template Microservice Template for Shipyard GCDN 0
shipyardlabs/spark-base 0
shipyardrun/shipyard 0
2)#下载拉取镜像 (Shipyard)
[root@hzl ~]# docker pull dockerclub/shipyard
Using default tag: latest
latest: Pulling from dockerclub/shipyard
Image docker.io/dockerclub/shipyard:latest uses outdated schema1 manifest format. Please upgrade to a schema2 image for better future compatibility. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
4d06f2521e4f: Pull complete
64100628847a: Pull complete
36a170440d6d: Pull complete
a823ae228c2d: Pull complete
a3ed95caeb02: Pull complete
Digest: sha256:bd5ac58c556506012f7788db18fc6fed3bcefb294e469babbeb87ad7ef15e219
Status: Downloaded newer image for dockerclub/shipyard:latest
docker.io/dockerclub/shipyard:latest
3)#查看镜像
[root@hzl ~]# docker images |grep shipyard
dockerclub/shipyard latest 2ac2c13dfa84 5 years ago 61.4MB
4)#运行并启动容器(Shipyard)
#步骤一:
[root@hzl ~]#docker run -it -d --name shipyard-rethinkdb-data --entrypoint /bin/bash shipyard/rethinkdb -l
#步骤二:
[root@hzl ~]# docker run -it -P -d --name shipyard-rethinkdb --volumes-from shipyard-rethinkdb-data shipyard/rethinkdb
Unable to find image 'shipyard/rethinkdb:latest' locally
latest: Pulling from shipyard/rethinkdb
Image docker.io/shipyard/rethinkdb:latest uses outdated schema1 manifest format. Please upgrade to a schema2 image for better future compatibility. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
a3ed95caeb02: Pull complete
2de59b831a23: Pull complete
a898f8c7f6ba: Pull complete
706514fbad74: Pull complete
1751027c1e76: Pull complete
a6b7b584b1ee: Pull complete
7676ef3b3703: Pull complete
Digest: sha256:ce71cc0591d91320e0bdc700f8f65014a8e88569db0e65f75be27b0b58113f99
Status: Downloaded newer image for shipyard/rethinkdb:latest
#步骤三:
[root@hzl ~]# docker run -it -p 8080:8080 -d --name shipyard --link shipyard-rethinkdb:rethinkdb shipyard/shipyard
Unable to find image 'shipyard/shipyard:latest' locally
latest: Pulling from shipyard/shipyard
cb5507795515: Pull complete
fd711d385b34: Pull complete
9f2a509de079: Pull complete
a5251eb716bb: Pull complete
Digest: sha256:5f065362680fa4565dd150c8da3edd09b79a7a3010d3ceef20093c2a879187e0
Status: Downloaded newer image for shipyard/shipyard:latest
09c60a3bc8cb72c106ad653e131f5f28fb073e9c439827e87a500607183ea382
5)#测试访问
1》服务器本地测试
[root@hzl ~]# docker ps |grep shipyard #查看服务状态
74528f5629af shipyard/rethinkdb "/usr/bin/rethinkdb …" 4 minutes ago Up 4 minutes 0.0.0.0:49160->8080/tcp, :::49160->8080/tcp, 0.0.0.0:49159->28015/tcp, :::49159->28015/tcp, 0.0.0.0:49158->29015/tcp, :::49158->29015/tcp shipyard-rethinkdb
0ac1bdc0f757 shipyard/rethinkdb "/bin/bash -l" 5 minutes ago Up 5 minutes 8080/tcp, 28015/tcp, 29015/tcp shipyard-rethinkdb-data
[root@hzl ~]# curl http://192.168.15.80:49160 #本地测试
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>RethinkDB Administration Console</title>
<meta name="description" content="">
<meta name="author" content="">
<meta http-equiv="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Cache-Control" content="no-cache">
<link rel="stylesheet" type="text/css" href="cluster.css?v=2.0.3" />
<link rel="stylesheet" type="text/css" href="js/chosen/chosen.css?v=2.0.3" />
<link rel="stylesheet" type="text/css" href="js/codemirror/codemirror.css?v=2.0.3" />
<link rel="stylesheet" type="text/css" href="js/codemirror/ambiance.css?v=2.0.3" />
<link rel="stylesheet" type="text/css" href="fonts/stylesheet.css?v=2.0.3" />
<link rel="stylesheet" type="text/css" href="js/nanoscroller/nanoscroller.css?v=2.0.3" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js?v=2.0.3"></script>
<script type="text/javascript" src="js/ZeroClipboard.min.js?v=2.0.3"></script>
<script type="text/javascript" src="js/handlebars.runtime-1.0.0.js?v=2.0.3"></script>
<script type="text/javascript" src="js/underscore-min.js?v=2.0.3"></script>
<script type="text/javascript" src="js/backbone.js?v=2.0.3"></script>
<script type="text/javascript" src="js/bootstrap/bootstrap-modal.js?v=2.0.3"></script>
<script type="text/javascript" src="js/bootstrap/bootstrap-alert.js?v=2.0.3"></script>
<script type="text/javascript" src="js/bootstrap/bootstrap-typeahead.js?v=2.0.3"></script>
<script type="text/javascript" src="js/bootstrap/bootstrap-button.js?v=2.0.3"></script>
<script type="text/javascript" src="js/bootstrap/bootstrap-dropdown.js?v=2.0.3"></script>
<script type="text/javascript" src="js/bootstrap/bootstrap-tooltip.js?v=2.0.3"></script>
<script type="text/javascript" src="js/bootstrap/bootstrap-popover.js?v=2.0.3"></script>
<script type="text/javascript" src="js/jquery.form.js?v=2.0.3"></script>
<script type="text/javascript" src="js/nanoscroller/jquery.nanoscroller.min.js?v=2.0.3"></script>
········
·····
2》使用浏览器访问测试
http://192.168.15.80:49160
【Shipyard 安装成功】
【Portainer】
轻量级图形页面管理之Portainer
1)#搜索查看镜像(portainer)
[root@hzl ~]# docker search portainer
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
portainer/portainer This Repo is now deprecated, use portainer/p… 2104
portainer/portainer-ce Portainer CE - Making Docker and Kubernetes … 624
portainer/agent An agent used to manage all the resources in… 109
portainer/templates App Templates for Portainer http://portainer… 23
lihaixin/portainer docker ui 15 [OK]
greenled/portainer-stack-utils Bash scripts to deploy/undeploy stacks in a … 6 [OK]
portainerci/portainer Portainer images automatically created via P… 5
portainer/portainer-k8s-beta Portainer for Kubernetes BETA 5
portainer/golang-builder Utility to build Golang binaries. 4 [OK]
hassioaddons/portainer 2
portainer/base Multi-stage build image to create the Portai… 2 [OK]
portainer/portainer-ee Portainer EE - Making Docker and Kubernetes … 2
thibaudlabat/portainer_32 Portainer built for 32bit Linux [ OUTDATED ]… 1
softonic/portainer-endpoint Allows auto register all the swarm nodes in … 1 [OK]
hassioaddons/portainer-armv7 1
portainer/agent-k8s-beta Portainer for Kubernetes BETA (agent) 1
portainerci/portainer-ee Portainer EE CI repository 0
iconviet/portainer 0
11384eb/portainer 0
helloysd/portainer 0
hassioaddons/portainer-amd64 0
antsoftxyz/portainer-api A portainer api wrapper which can help you C… 0
nenadilic84/portainer 0
portainerci/agent Portainer agent images automatically created… 0
xanderstrike/portainer-issue for illustrating a portainer issue 0
2)#拉取镜像(portainer)
[root@hzl ~]# docker pull portainer/portainer
Using default tag: latest
latest: Pulling from portainer/portainer
Digest: sha256:fb45b43738646048a0a0cc74fcee2865b69efde857e710126084ee5de9be0f3f
Status: Image is up to date for portainer/portainer:latest
docker.io/portainer/portainer:latest
3)#启动容(portainer)
[root@hzl ~]# docker volume create portainer_data
portainer_data
[root@hzl ~]# docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
80d22fc6d88adcb72e42ea99af9ed92a5af621efc7ed7ca8449db605e8ca3800
[root@docker ~]# docker ps |grep portainer
80d22fc6d88a portainer/portainer "/portainer" About a minute ago Up About a minute 0.0.0.0:9000->9000/tcp, :::9000->9000/tcp portainer
ps :参数说明:
-v /var/run/docker.sock:/var/run/docker.sock #将托管机的Docker守护进程(Docker daemon)关闭监听的Unix域可以挂载到容器中;
-v portainer_data:/data #把宿主机portainer_data数据卷挂载到容器/ data目录;
4)#测试访问(portainer)
1》服务器本机测试
[root@hzl ~]# curl http://192.168.15.80:9000
<!DOCTYPE html
><html lang="en" ng-app="portainer">
<head>
<meta charset="utf-8" />
<title>Portainer</title>
<meta name="description" content="" />
<meta name="author" content="Portainer.io" />
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Fav and touch icons -->
<link rel="apple-touch-icon" sizes="180x180" href="dc4d092847be46242d8c013d1bc7c494.png" />
<link rel="icon" type="image/png" sizes="32x32" href="5ba13dcb526292ae707310a54e103cd1.png" />
<link rel="icon" type="image/png" sizes="16x16" href="f9508a64a1beb81be174e194573f7450.png" />
<link rel="mask-icon" href="07745d55b001c85826eedd479285cdbb.svg" color="#5bbad5" />
.............
.......
2》使用浏览器测试访问
http://192.168.15.80:9000
【登陆设置管理员账号和密码】【创建单机版,选择Local】
【选择Local进入仪表盘主页面】
【查看服务器的状态】
【查看运行的容器状态】
【查看本地下载的所有镜像】
【查看容器监控】
>【这就结束了】
(完成了)