Chạy Dashy dashboard bằng Docker
Nghia Phan
Mục Lục Bài Viết
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
Cài Docker
Đăng nhập Linux Docker host và chạy:
# install prerequisitessudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y# add docker gpg keycurl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -# add docker software repositorysudo 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 dockersudo apt install docker-ce docker-compose containerd.io -y# enable and start docker servicesudo systemctl enable docker && sudo systemctl start docker# add the current user to the docker groupsudo usermod -aG docker $USER# reauthenticate for the new group membership to take effectsu - $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
- Tạo thư mục, tải file cấu hình mẫu, đặt quyền và chạy container:
# create working directoriesmkdir ~/docker/dashy -p# download default conf.ymlwget -O ~/docker/dashy/conf.yml https://raw.githubusercontent.com/Lissy93/dashy/refs/heads/master/user-data/conf.yml# set owner of working directoriessudo chown "$USER":"$USER" ~/docker -R# allow the container to write to working directoriessudo chmod a+rwx -R ~/docker/dashy# run the dashy docker imagedocker run -d --name dashy -p 8080:8080 -v ~/docker/dashy:/app/user-data --restart=unless-stopped lissy93/dashy:latest
- Mở
http://DNSorIP:8080. - Kiểm tra trang Welcome của Dashy và sửa
~/docker/dashy/conf.ymltừ host khi cần.1
Quảng cáo
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, mình 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
- Tutorial gốc: i12bretro 0992
- Video gốc: Run Dashy Application Dashboard in Docker
Nguồn
Footnotes
-
https://i12bretro.github.io/tutorials/0992.html — Run Dashy Application Dashboard in Docker (i12bretro) ↩ ↩2 ↩3 ↩4
Bình Luận & Thảo Luận
Góp ý, hỏi đáp và chia sẻ suy nghĩ của bạn