一 、docker 部署 sun-panel 导航页
sun-panel导航页_Docker Hub地址:
https://hub.docker.com/r/hslr/sun-panel
sun-panel导航页_GitHub地址:
https://github.com/hslr-s/sun-panel
插件集地址:
https://github.com/hslr-s/sun-panel-js-plugins
Sun-Panel:
https://doc.sun-panel.top/zh_cn
sun-panel导航页_哔哩哔哩:
https://space.bilibili.com/27407696/channel/collectiondetail?sid=2023810
sun-panel导航页_后台地址:
http://localhost:3002
1 、终端命令创建docker-compose.yml文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
mkdir -p /mnt/mydisk/home/sun-panel/config && touch /mnt/mydisk/home/sun-panel/docker-compose.yml && cat > /mnt/mydisk/home/sun-panel/docker-compose.yml <<'EOF'
services:
sun-panel: ## 服务名称(可自定义)
container_name: sun-panel ## 容器名称(可自定义)
image: hslr/sun-panel:beta ## 镜像版本
restart: always ## 重启策略
network_mode: bridge ## 桥接网络
ports:
- 3002:3002
volumes:
- ./config:/app/conf
- /:/host
- /var/run/docker.sock:/var/run/docker.sock
# 导航页 sun-panel
# 默认账户:admin@sun.cc
# 默认密码:12345678
# docker版Sun-Panel重置第一个管理员的密码
# sh命令:docker exec -it sun-panel bash
# sh命令:./sun-panel -password-reset
# 更新地址:https://github.com/hslr-s/sun-panel/releases
EOF
cd /mnt/mydisk/home/sun-panel && docker-compose up -d
|
2 、拉取并运行
1
|
cd /mnt/mydisk/home/sun-panel && docker-compose up -d
|
3 、停止并删除
1
|
cd /mnt/mydisk/home/sun-panel && docker-compose down
|
4 、拉取镜像
1
|
docker pull hslr/sun-panel:latest
|
5 、容器升级
1
|
cd /mnt/mydisk/home/sun-panel && docker-compose down && docker-compose pull && docker-compose up -d && docker image prune -f
|
二 、容器维护命令
1 、查看所有运行容器的名称
1
|
docker ps -a --format "{{.Names}}"
|
2 、停止 sun-panel 容器
3 、启动 sun-panel 容器
4 、重启 sun-panel 容器
1
|
docker restart sun-panel
|
5 、进入 sun-panel 容器
1
2
3
|
## Ctrl+D 退出容器
## docker exec -it sun-panel sh
docker exec -it sun-panel bash
|
6 、查看 sun-panel 配置文件
1
|
cat /mnt/mydisk/home/sun-panel/docker-compose.yml
|