一、docker-ui介绍
docker-ui是一个易用且轻量化的Docker管理工具,透过Web界面的操作,方便快捷操作docker容器化工作。 docker-ui拥有易操作化化界面,不须记忆docker指令,仅需下载镜像即可立刻加入完成部署。基于docker的特性,于docker-ui中可以直接更新镜像的版本,使用相同的设置,重新部署并取代原来的容器即可完成升级,使用最新版本的功能。 docker-ui功能覆盖docker cli命令行95%以上的命令功能,通过docker-ui界面里提供的可视化操作功能,轻松的进行docker环境和docker swarm集群环境的管理和维护功能。 docker-ui是一个可视化的docker容器镜像的图形化管理工具,利用docker-ui可以轻松构建,管理和维护docker环境。 而且完全开源免费,基于容器化的安装方式,方便高效部署。
二、本次实践介绍
1. 本次实践简介
本次实践部署环境为个人测试环境
2. 本地环境规划
本次实践环境规划:docker快速拉取docker-ui镜像,然后后台启动docker-ui镜像
启动镜像后的名字IP地址容器镜像版本操作系统版本docker-ui192.168.20.8latestubuntu 22.04
三、检查本地Docker环境
检查本地Docker版本
检查Docker版本:docker version
root@WellDone:/home/goodjob# docker version
Client: Docker Engine - Community
Version: 25.0.0
API version: 1.44
Go version: go1.21.6
Git commit: e758fe5
Built: Thu Jan 18 17:09:49 2024
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 25.0.0
API version: 1.44 (minimum version 1.24)
Go version: go1.21.6
Git commit: 615dfdf
Built: Thu Jan 18 17:09:49 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.27
GitCommit: a1496014c916f9e62104b33d1bb5bd03b0858e59
runc:
Version: 1.1.11
GitCommit: v1.1.11-0-g4bccb38
docker-init:
Version: 0.19.0
GitCommit: de40ad0
root@WellDone:/home/goodjob#
- 检查Docker服务状态
检查Docker服务状态,确保Docker服务正常运行。
systemctl status docker
root@WellDone:/home/goodjob/Downloads# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2024-01-24 08:54:31 CST; 1 day 4h ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 1549 (dockerd)
Tasks: 65
Memory: 419.5M
CPU: 38.874s
CGroup: /system.slice/docker.service
├─ 1549 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
├─ 2010 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 6379 -container-ip 172.17.0.2 -container-port 6379
├─ 2016 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 6379 -container-ip 172.17.0.2 -container-port 6379
├─ 2029 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 5432 -container-ip 172.17.0.3 -container-port 5432
├─ 2036 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 5432 -container-ip 172.17.0.3 -container-port 5432
├─123083 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8888 -container-ip 172.17.0.4 -container-port 8080
└─123095 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8888 -container-ip 172.17.0.4 -container-port 8080
1月 24 08:54:31 WellDone dockerd[1549]: time="2024-01-24T08:54:31.067895045+08:00" level=info msg="API listen on /run/docker.sock"
1月 24 08:54:31 WellDone systemd[1]: Started Docker Application Container Engine.
1月 24 16:13:48 WellDone dockerd[1549]: time="2024-01-24T16:13:48.185008219+08:00" level=info msg="ignoring event" container=8ad99af82d8a41dd661d>
1月 24 16:13:48 WellDone dockerd[1549]: time="2024-01-24T16:13:48.189484205+08:00" level=warning msg="ShouldRestart failed, container will not be>
1月 24 21:58:08 WellDone dockerd[1549]: time="2024-01-24T21:58:08.024915139+08:00" level=info msg="ignoring event" container=27fd28e2993f31b170b8>
1月 24 21:58:08 WellDone dockerd[1549]: time="2024-01-24T21:58:08.029986730+08:00" level=warning msg="ShouldRestart failed, container will not be>
1月 25 10:46:16 WellDone dockerd[1549]: time="2024-01-25T10:46:16.329180722+08:00" level=info msg="Container failed to exit within 10s of signal >
1月 25 10:46:16 WellDone dockerd[1549]: time="2024-01-25T10:46:16.350757439+08:00" level=info msg="ignoring event" container=b1223add00f36bbb3246>
1月 25 10:49:21 WellDone dockerd[1549]: time="2024-01-25T10:49:21.993755983+08:00" level=info msg="Container failed to exit within 10s of signal >
1月 25 10:49:22 WellDone dockerd[1549]: time="2024-01-25T10:49:22.015822650+08:00" level=info msg="ignoring event" container=edb0e153b45dbe62acd8>
lines 1-28/28 (END)
四、部署docker-ui镜像
1. 下载docker-ui镜像
docker pull joinsunsoft/docker.ui
root@WellDone:/home/goodjob# docker pull joinsunsoft/docker.ui
Using default tag: latest
latest: Pulling from joinsunsoft/docker.ui
213ec9aee27d: Pull complete
362df81e5664: Pull complete
c3f864fca442: Pull complete
5a55080a5af0: Pull complete
497ed8376dfb: Pull complete
4642bc86bdfb: Pull complete
af43397a88d3: Pull complete
Digest: sha256:1b70b86be661e931e112d8b59850eeac927966679c52b46064d67df2c489d7a5
Status: Downloaded newer image for joinsunsoft/docker.ui:latest
docker.io/joinsunsoft/docker.ui:latest
root@WellDone:/home/goodjob# docker images
joinsunsoft/docker.ui latest a56148454e56 18 months ago 69MB
2. 创建容器
使用docker快速创建docker-ui的容器。
完整创建过程:
1.启动一个docker-ui的测试容器。
docker run -d --name docker-ui --restart always -v /var/run/docker.sock:/var/run/docker.sock -p 1234:8999 joinsunsoft/docker.ui:latest
2.启动完毕后查看下是否启动正常
root@WellDone:/home/goodjob# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e8435234f32a joinsunsoft/docker.ui:latest "./server" 3 seconds ago Up 2 seconds 0.0.0.0:1234->8999/tcp, :::1234->8999/tcp docker-ui
3.容器启动正常,访问
http://ip:1234
3. 检查容器运行状态
检查容器的运行状态,确保服务的正常运行。
docker ps
root@WellDone:/home/goodjob# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES e8435234f32a joinsunsoft/docker.ui:latest "./server" 3 seconds ago Up 2 seconds 0.0.0.0:1234->8999/tcp, :::1234->8999/tcp docker-ui
五、访问docker-ui页面
访问docker-ui首页 访问地址:http://192.168.20.8:1234
初始用户名/密码ginghan/123456
版权归原作者 全糖去冰吃不了苦 所有, 如有侵权,请联系我们删除。