请给我详细的教程在centos用docker 部署可视化的clash我需要详细的步骤请用dreamacroclash 订阅地址为httpssub789stsubtarget=clash&url=https3A2F2Fv1dogapiyachts2Fapi2Fv12Fclient 2Fsubscribe3Ftoken3Dc651059 7b9dde1e97cc2111ffa82f0e6&inser
好的,以下是详细的步骤:
- 安装docker和docker-compose
首先需要在centos系统上安装docker和docker-compose,可以参考docker官方文档进行安装。
- 下载clash配置文件
使用curl命令下载clash配置文件,保存到本地。
curl -o config.yaml https://sub.789.st/sub?target=clash&url=https%3A%2F%2Fv1.dogapi.yachts%2Fapi%2Fv1%2Fclient% 2Fsubscribe%3Ftoken%3Dc651059 7b9dde1e97cc2111ffa82f0e6&insert=false
- 编写docker-compose文件
创建docker-compose.yml文件并添加以下内容:
version: '3'
services:
clash:
container_name: clash
image: dreamacro/clash
restart: always
network_mode: host
volumes:
- ./config.yaml:/root/.config/clash/config.yaml
其中,container_name指定容器名称,image指定clash镜像,volumes指定将本地的config.yaml文件映射到容器中的/config.yaml文件,network_mode指定使用host网络模式。
- 启动clash容器
使用docker-compose启动clash容器:
docker-compose up -d
这条命令会在后台启动clash容器。
- 访问clash可视化界面
在浏览器中访问http://localhost:7890/ui/,即可进入clash的可视化界面。
以上就是在centos上使用docker部署可视化的clash的详细步骤
原文地址: https://www.cveoy.top/t/topic/eZda 著作权归作者所有。请勿转载和采集!