feat: docker buildx.
Some checks failed
Build and Push Docker Image / buildx (push) Has been cancelled

This commit is contained in:
2025-11-11 15:09:02 +08:00
parent c8b789afe3
commit f1a88c9890
5 changed files with 102 additions and 8 deletions

View File

@@ -26,6 +26,29 @@ npm start
> 如需自定义端口,运行前设定 `PORT=xxxx` 即可。
## 🚀 Docker Buildx 支持
本项目现在支持使用 Docker Buildx 构建多平台镜像,并可推送至 Docker Hub。
### 使用 GitHub Actions 自动构建和推送
1. 在 GitHub 仓库中设置以下 secrets:
- `DOCKERHUB_USERNAME` - 你的 Docker Hub 用户名
- `DOCKERHUB_TOKEN` - 你的 Docker Hub 访问令牌
2. 推送代码到 main 分支或创建版本标签GitHub Actions 将自动构建并推送镜像。
### 手动构建和推送
```bash
# 设置 buildx
docker buildx create --name mybuilder --use
docker buildx inspect --bootstrap
# 构建并推送多平台镜像
docker buildx build --platform linux/amd64,linux/arm64 -t yourusername/timeline-calendar:latest --push .
```
## 🧭 使用指南
1. **添加服务器**:页面底部输入想连接的后端地址,点击「添加」,并从下拉框选择它
2. **注册 / 登录**:按提示填写信息,完成后即可自动加载个人日历