云原生之使用Docker部署Dashy个人导航页

举报
江湖有缘 发表于 2022/11/22 11:55:48 2022/11/22
【摘要】 云原生之使用Docker部署Dashy个人导航页

一、Dashy介绍

Dashy是一款开源的个人导航页,通过使自托管服务从一个位置,访问用户展示来帮助您组织自托管服务。

二、检查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 Tue 2022-11-22 18:55:55 CST; 14min ago
     Docs: https://docs.docker.com
 Main PID: 11080 (dockerd)
    Tasks: 113
   Memory: 235.4M
   CGroup: /system.slice/docker.service
           ├─11080 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
           ├─21686 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8233 -container-ip 192.168.192.2 -container-port 80
           ├─21694 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8233 -container-ip 192.168.192.2 -container-port 80
           ├─21749 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8765 -container-ip 172.17.0.2 -container-port 80
           ├─21754 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8765 -container-ip 172.17.0.2 -container-port 80
           ├─21777 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 3555 -container-ip 192.168.208.2 -container-port 3000
           ├─21783 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 3555 -container-ip 192.168.208.2 -container-port 3000
           ├─21803 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 3222 -container-ip 192.168.80.2 -container-port 5032
           ├─21813 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 3316 -container-ip 192.168.192.3 -container-port 3306
           ├─21820 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 3222 -container-ip 192.168.80.2 -container-port 5032
           ├─21822 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 3316 -container-ip 192.168.192.3 -container-port 3306
           ├─21839 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 5032 -container-ip 172.17.0.3 -container-port 5032
           ├─21840 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 2375 -container-ip 192.168.224.2 -container-port 2375
           ├─21845 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 2375 -container-ip 192.168.224.2 -container-port 2375
           └─21857 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 5032 -container-ip 172.17.0.3 -container-port 5032

Nov 22 18:55:50 server001 dockerd[11080]: time="2022-11-22T18:55:50.110714738+08:00" level=info msg="Removing stale sandbox 4a508855e219d0c...af7816)"
Nov 22 18:55:50 server001 dockerd[11080]: time="2022-11-22T18:55:50.119359770+08:00" level=warning msg="Error (Unable to complete atomic op...ing...."
Nov 22 18:55:50 server001 dockerd[11080]: time="2022-11-22T18:55:50.238772131+08:00" level=info msg="Removing stale sandbox 71a177f0989b76c...fcc6ab)"
Nov 22 18:55:50 server001 dockerd[11080]: time="2022-11-22T18:55:50.247514621+08:00" level=warning msg="Error (Unable to complete atomic op...ing...."
Nov 22 18:55:50 server001 dockerd[11080]: time="2022-11-22T18:55:50.269079436+08:00" level=info msg="Default bridge (docker0) is assigned w...address"
Nov 22 18:55:55 server001 dockerd[11080]: time="2022-11-22T18:55:55.119373953+08:00" level=info msg="Loading containers: done."
Nov 22 18:55:55 server001 dockerd[11080]: time="2022-11-22T18:55:55.178225677+08:00" level=info msg="Docker daemon" commit=a89b842 graphdri...20.10.17
Nov 22 18:55:55 server001 dockerd[11080]: time="2022-11-22T18:55:55.178354920+08:00" level=info msg="Daemon has completed initialization"
Nov 22 18:55:55 server001 dockerd[11080]: time="2022-11-22T18:55:55.264774714+08:00" level=info msg="API listen on /var/run/docker.sock"
Nov 22 18:55:55 server001 systemd[1]: Started Docker Application Container Engine.
Hint: Some lines were ellipsized, use -l to show in full.


三、下载Dashy镜像

[root@server001 ~]# docker pull lissy93/dashy
Using default tag: latest
latest: Pulling from lissy93/dashy
97518928ae5f: Already exists 
16a1a5057866: Pull complete 
ad8b526cbb1f: Pull complete 
0328e268dee9: Pull complete 
431b2cc444fd: Pull complete 
9fbacfbabf9a: Pull complete 
bb29992a45f1: Pull complete 
7d97dd40ace3: Pull complete 
c97d975647af: Pull complete 
9ef574891a8e: Pull complete 
Digest: sha256:6bee932ad94548c12de6e838ca16ec044c8841bafbc3b534e65ba309c7f215ab
Status: Downloaded newer image for lissy93/dashy:latest
docker.io/lissy93/dashy:latest

四、部署Dashy

1.创建数据目录

[root@server001 ~]# mkdir -p /data/dashy/{data,icons}
[root@server001 ~]# chmod -R 777 /data/dashy/
[root@server001 ~]# cd /data/dashy/
[root@server001 dashy]# 

2.编辑conf.yaml


[root@server001 data]# cat conf.yml 
---
# Page meta info, like heading, footer text and nav links
pageInfo:
  title: Dashy
  description: Welcome to your new dashboard!
  navLinks:
  - title: GitHub
    path: https://github.com/Lissy93/dashy
  - title: Documentation
    path: https://dashy.to/docs

# Optional app settings and configuration
appConfig:
  theme: colorful
  layout: auto
  iconSize: medium
  language: en
  auth:
    users:
      - user: admin    # 改成自己的用户名
        hash: hash-of-a-password-you-choose-using-sha256-hashing  # cha256 哈希加密,地址用这个: https://emn178.github.io/online-tools/sha256.html
        type: admin
# Main content - An array of sections, each containing an array of items
sections:
- name: Getting Started
  icon: fas fa-rocket
  items:
  - title: Dashy Live
    description: Development a project management links for Dashy
    icon: https://i.ibb.co/qWWpD0v/astro-dab-128.png
    url: https://live.dashy.to/
    target: newtab
  - title: GitHub
    description: Source Code, Issues and Pull Requests
    url: https://github.com/lissy93/dashy
    icon: favicon
  - title: Docs
    description: Configuring & Usage Documentation
    provider: Dashy.to
    icon: far fa-book
    url: https://dashy.to/docs
  - title: Showcase
    description: See how others are using Dashy
    url: https://github.com/Lissy93/dashy/blob/master/docs/showcase.md
    icon: far fa-grin-hearts
  - title: Config Guide
    description: See full list of configuration options
    url: https://github.com/Lissy93/dashy/blob/master/docs/configuring.md
    icon: fas fa-wrench
  - title: Support
    description: Get help with Dashy, raise a bug, or get in contact
    url: https://github.com/Lissy93/dashy/blob/master/.github/SUPPORT.md
    icon: far fa-hands-helping


3.创建Dashy容器


[root@server001 dashy]# docker run -d   -p 4000:80   -v /data/dashy/data/conf.yml:/app/public/conf.yml    --name my-dashboard   --restart=always   lissy93/dashy:latest
89467158afbe9833900356329ea46e300cab41ca46586f0bc1e258284c16ef89


5.查看Dashy容器状态


[root@server001 dashy]# docker ps
CONTAINER ID   IMAGE                                          COMMAND                  CREATED          STATUS                             PORTS                                                  NAMES
89467158afbe   lissy93/dashy:latest                           "docker-entrypoint.s…"   15 seconds ago   Up 15 seconds (health: starting)   0.0.0.0:4000->80/tcp, :::4000->80/tcp                  my-dashboard




五、访问Dashy首页

image.png

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。