feat(docker-compose): 添加 Clash配置文件和使用说明

- 新增 Clash 的 Docker Compose配置文件
- 编写 Clash 的使用说明文档
- 添加 Docker Compose 安装指南
This commit is contained in:
2025-03-13 23:26:58 +08:00
parent 699087fbc7
commit 4ae2554721
3 changed files with 50 additions and 0 deletions

15
docker-compose/README.md Normal file
View File

@@ -0,0 +1,15 @@
# Docker Compose
## 安装
Debian/Ubuntu/Raspbian
```bash
apt-get update && apt-get install docker-compose
```
CentOS/RHEL
```bash
yum install docker-compose
```

View File

@@ -0,0 +1,21 @@
# Clash
创建一些文件夹
```bash
mkdir -p /opt/docker/clash && mkdir -p /opt/docker/clash/data && cd /opt/docker/clash
```
**请在 `data` 文件夹下创建 `config.yaml` 文件**
下载 docker-compose.yml
```bash
curl -fsSL https://git.sugarscat.cn/me/bash/-/raw/main/clash/docker-compose.yml > docker-compose.yml
```
启动
```bash
docker-compose up -d
```

View File

@@ -0,0 +1,14 @@
version: '3'
services:
# Clash
clash:
image: registry.cn-hangzhou.aliyuncs.com/37point2/clash:v1.18.0
container_name: clash
volumes:
- ./data/config.yaml:/root/.config/clash/config.yaml
ports:
- "7890:7890/tcp"
- "7890:7890/udp"
- "9090:9090"
restart: always