feat: 添加 Docker Hub 镜像支持
- 更新 Dockerfile 使用 Go 1.24 - 优化镜像大小(14.8MB) - 推送到 Docker Hub (ouaone/sms-receiver-go) - 更新 README.md 添加 Docker Hub 使用说明
This commit is contained in:
20
README.md
20
README.md
@@ -121,6 +121,24 @@ make run
|
||||
|
||||
### 方式 3: Docker 部署
|
||||
|
||||
**使用 Docker Hub 镜像(推荐)**:
|
||||
|
||||
```bash
|
||||
# 拉取镜像
|
||||
docker pull ouaone/sms-receiver-go:latest
|
||||
|
||||
# 运行容器
|
||||
docker run -d \
|
||||
--name sms-receiver-go \
|
||||
-p 28001:28001 \
|
||||
-v $(pwd)/config.yaml:/app/config.yaml:ro \
|
||||
-v $(pwd)/data:/app/data \
|
||||
--restart unless-stopped \
|
||||
ouaone/sms-receiver-go:latest
|
||||
```
|
||||
|
||||
**从源码构建**:
|
||||
|
||||
```bash
|
||||
# 构建镜像
|
||||
make docker-build
|
||||
@@ -137,6 +155,8 @@ make docker-logs
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
**Docker Hub**: https://hub.docker.com/r/ouaone/sms-receiver-go
|
||||
|
||||
### 方式 4: 从源码编译
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user