Skip to content

Commit

Permalink
Merge pull request #137 from aipeach/patch-2
Browse files Browse the repository at this point in the history
Update Docker README.md
  • Loading branch information
AirportR authored Nov 30, 2023
2 parents d8b4c9d + 1cda31c commit 934957a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ fulltclash-windows-amd64 为 Windows-amd64 所支持的

编译完成覆盖原文件即可 ,如果操作难度太大,可以发起issue详谈。
### Docker启动
教程文档待更新
[./docker/ 目录](https://github.com/AirportR/FullTclash/tree/dev/docker)
### 为程序设置进程守护(Linux)
由于Linux系统特性,关闭ssh连接后,前台程序会被关闭。您需要设置进程守护,才能在后台不间断地运行程序。具体方法Google搜索即可。
## 交流探讨
Expand Down
31 changes: 21 additions & 10 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,33 @@ clash:
branch: meta
```

## 构建Docker镜像
## 部署

### 下载Dockerfile
```
wget -N https://raw.githubusercontent.com/AirportR/FullTclash/dev/docker/Dockerfile
```

### 构建镜像
### 拉取镜像
```
docker build -t fulltclash:dev .
docker pull ghcr.io/airportr/fulltclash:dev
```

启动
### docker
```bash
docker run -itd --name=fulltclash --restart=always -v /etc/FullTclash/config.yaml:/app/resources/config.yaml ghcr.io/airportr/fulltclash:dev
```
docker run -itd --name=fulltclash --restart=always -v /etc/FullTclash/config.yaml:/app/resources/config.yaml fulltclash:dev

### docker-compose

```bash
# 安装 docker-compose
# curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
# chmod +x /usr/local/bin/docker-compose
wget -N https://raw.githubusercontent.com/AirportR/FullTclash/dev/docker/docker-compose.yml

# 启动
docker-compose up -d
# 停止
docker-compose down
```

查看日志
```
docker exec -it fulltclash tail -f /var/log/fulltclash.log
Expand All @@ -48,4 +59,4 @@ docker exec -it fulltclash bash /app/docker/update.sh
重启程序
```
docker exec -it fulltclash supervisorctl restart fulltclash
```
```
9 changes: 9 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '3.9'

services:
fulltclash:
image: ghcr.io/airportr/fulltclash:dev
restart: always
container_name: fulltclash
volumes:
- /etc/FullTclash/config.yaml:/app/resources/config.yaml

0 comments on commit 934957a

Please sign in to comment.