云原生之使用Docker部署homepage导航页
【摘要】 云原生之使用Docker部署homepage导航页
一、homepage介绍
现代(完全静态、快速)、安全(完全代理)、高度可定制的应用程序仪表板,集成了超过 25 种服务和超过 15 种语言的翻译。
二、检查本地docker状态
1.检查docker状态
[root@server001 ~]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2022-11-06 06:02:26 CST; 1 weeks 6 days ago
Docs: https://docs.docker.com
Main PID: 9869 (dockerd)
Tasks: 91
Memory: 3.3G
CGroup: /system.slice/docker.service
├─ 9869 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
├─ 88493 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 3222 -container-ip 192.168.80.2 -container-port 5032
├─ 88500 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 3222 -container-ip 192.168.80.2 -container-port 5032
├─ 91124 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 10000 -container-ip 172.17.0.3 -container-port 10000
├─ 91130 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 10000 -container-ip 172.17.0.3 -container-port 10000
├─ 92154 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 5032 -container-ip 172.17.0.4 -container-port 5032
├─ 92160 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 5032 -container-ip 172.17.0.4 -container-port 5032
├─106882 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 3316 -container-ip 192.168.192.2 -container-port 3306
├─106888 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 3316 -container-ip 192.168.192.2 -container-port 3306
├─107032 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8233 -container-ip 192.168.192.3 -container-port 80
├─107037 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8233 -container-ip 192.168.192.3 -container-port 80
├─116625 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8765 -container-ip 172.17.0.2 -container-port 80
└─116630 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8765 -container-ip 172.17.0.2 -container-port 80
Nov 18 23:10:18 server001 dockerd[9869]: time="2022-11-18T23:10:18.138714642+08:00" level=info msg="ignoring event" container=8380ebc7d020...kDelete"
Nov 18 23:10:19 server001 dockerd[9869]: time="2022-11-18T23:10:19.327219758+08:00" level=info msg="ignoring event" container=2e878e0b5acc...kDelete"
Nov 18 23:14:37 server001 dockerd[9869]: time="2022-11-18T23:14:37.073651406+08:00" level=info msg="ignoring event" container=ef5ca6380386...kDelete"
Nov 18 23:14:38 server001 dockerd[9869]: time="2022-11-18T23:14:38.313154636+08:00" level=info msg="ignoring event" container=cfc52962d8d3...kDelete"
Nov 18 23:19:15 server001 dockerd[9869]: time="2022-11-18T23:19:15.961130166+08:00" level=warning msg="Failed to allocate and map port 330... in use"
Nov 18 23:19:15 server001 dockerd[9869]: time="2022-11-18T23:19:15.988282221+08:00" level=error msg="a0eb94f3c58843ee478e275ee36338c38f7da...ntainer"
Nov 18 23:19:15 server001 dockerd[9869]: time="2022-11-18T23:19:15.993476870+08:00" level=error msg="Handler for POST /v1.25/containers/a0eb94f3c5...
Nov 19 00:47:49 server001 dockerd[9869]: time="2022-11-19T00:47:49.553244119+08:00" level=info msg="Attempting next endpoint for pull afte...unknown"
Nov 19 00:48:20 server001 dockerd[9869]: time="2022-11-19T00:48:20.063669869+08:00" level=info msg="Download failed, retrying (1/5): net/h...timeout"
Nov 19 00:53:28 server001 dockerd[9869]: time="2022-11-19T00:53:28.417569916+08:00" level=error msg="Not continuing with pull after error:...anceled"
Hint: Some lines were ellipsized, use -l to show in full.
2.检查系统版本
[root@server001 ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
三、下载homepage镜像
[root@server001 ~]# docker pull ghcr.io/benphelps/homepage:latest
latest: Pulling from benphelps/homepage
213ec9aee27d: Pull complete
4cf055c45671: Pull complete
bb15f8897be6: Pull complete
8d429ea46e68: Pull complete
db9b463faf84: Pull complete
628af1bfc622: Pull complete
f9b6ea337cea: Pull complete
7342375bc9bb: Pull complete
739199b897e4: Pull complete
Digest: sha256:4e0bf58f98920c99d060e86b490cf037f2eec78c2d0b966fd76306b91f132cbc
Status: Downloaded newer image for ghcr.io/benphelps/homepage:latest
ghcr.io/benphelps/homepage:latest
四、部署homepage
1.创建数据目录
[root@server001 ~]# mkdir -p /data/homepage/data
[root@server001 ~]# chmod -R 777 /data/homepage/
[root@server001 ~]# cd /data/homepage/
[root@server001 homepage]#
2.创建homepage
docker run -d --name homepage \
-p 3660:3000 \
-v /data/homepage/data:/app/config \
-v /var/run/docker.sock:/var/run/docker.sock \
--restart always \
ghcr.io/benphelps/homepage:latest
3.检查容器状态
[root@server001 homepage]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ce70d20bf585 ghcr.io/benphelps/homepage:latest "docker-entrypoint.s…" 44 seconds ago Up 44 seconds (healthy) 0.0.0.0:3660->3000/tcp, :::3660->3000/tcp homepage
五、访问homepage
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)