Bookmark

Chạy Dashy dashboard bằng Docker

Dashy là dashboard cá nhân self-hosted có status checking, widget, theme, icon pack và UI editor. Bài này dùng image lissy93/dashy:latest, bind thư mục user-data và cho truy cập ở cổng 8080.1

Youtube video player

Video gốc được embed trực tiếp bằng player YouTube; không rehost video hoặc ảnh của nguồn.2

Cài Docker

Đăng nhập Linux Docker host và chạy:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# install prerequisites
sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y
# add docker gpg key
curl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -
# add docker software repository
sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable"
# install docker
sudo apt install docker-ce docker-compose containerd.io -y
# enable and start docker service
sudo systemctl enable docker && sudo systemctl start docker
# add the current user to the docker group
sudo usermod -aG docker $USER
# reauthenticate for the new group membership to take effect
su - $USER

Nếu distro mới không còn phù hợp với apt-key, hãy đổi sang Docker docs hiện hành thay vì bỏ qua cảnh báo.1

Chạy Dashy

  1. Tạo thư mục, tải file cấu hình mẫu, đặt quyền và chạy container:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# create working directories
mkdir ~/docker/dashy -p
# download default conf.yml
wget -O ~/docker/dashy/conf.yml https://raw.githubusercontent.com/Lissy93/dashy/refs/heads/master/user-data/conf.yml
# set owner of working directories
sudo chown "$USER":"$USER" ~/docker -R
# allow the container to write to working directories
sudo chmod a+rwx -R ~/docker/dashy
# run the dashy docker image
docker run -d --name dashy -p 8080:8080 -v ~/docker/dashy:/app/user-data --restart=unless-stopped lissy93/dashy:latest
  1. Mở http://DNSorIP:8080.
  2. Kiểm tra trang Welcome của Dashy và sửa ~/docker/dashy/conf.yml từ host khi cần.1

Backup và giới hạn

Backup ~/docker/dashy/conf.yml và toàn bộ ~/docker/dashy trước khi cập nhật image. chmod a+rwx trong quy trình nguồn thuận tiện cho container nhưng rộng; trong HomeLab production, tôi sẽ thu hẹp owner/group sau khi xác nhận UID/GID image. Không đưa token API của widget vào bài hoặc repository.1

Nguồn và video

Nguồn


  1. https://i12bretro.github.io/tutorials/0992.html — Run Dashy Application Dashboard in Docker (i12bretro) ↩︎ ↩︎ ↩︎ ↩︎

  2. https://www.youtube.com/watch?v=GfuTdFSh1xc — Run Dashy Application Dashboard in Docker (official video) ↩︎


0 Bình luận

Góp Ý / Bình Luận / Đánh giá