Homelab搭建基础教程
vscode下载地址:https://code.visualstudio.com/
Finalshell下载地址:https://finalshell.net/
(1)更新操作系统
sudo apt update
(2)打开系统端口,让流量通过
禁用防火墙
sudo ufw disable && echo "Firewall has been disabled."
配置 ufw
允许所有流量
sudo ufw default allow incoming && sudo ufw default allow outgoing && sudo ufw enable && echo "All traffic is now allowed."
(3)安装docker
sudo apt install docker.io
(4)安装docker-compose
sudo apt install docker-compose
(5)创建一个新目录
mkdir homepage-demo-1
(6)进入新创建的目录
cd homepage-demo-1
(7)到微软Vscode创建yaml文件
在yaml文件下面添加如下代码:
version: "3.3" services: homepage: image: ghcr.io/gethomepage/homepage:latest container_name: homepage ports: - 3000:3000 volumes: - ./config:/app/config - ./images:/app/images - ./icons:/app/icons environment: - PUID=0 - PGID=0 restart: unless-stopped
(8)启动docke容器
docker-compose up -d