添加docker镜像构建说明

This commit is contained in:
葛佳祥 2024-04-09 11:55:56 +08:00
parent f96a613ad5
commit be2290ae80
3 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,2 @@
FLUTTER_STORAGE_BASE_URL="https://mirrors.tuna.tsinghua.edu.cn/flutter"
PUB_HOSTED_URL="https://mirrors.tuna.tsinghua.edu.cn/dart-pub"

1
star_lock/.docker/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.env

View File

@ -0,0 +1,33 @@
# docker持续部署
构建镜像来自https://github.com/MobileDevOps/flutter-sdk-image/
## 使用方法
1. 复制.env文件并编辑其中的代理设置
```bash
cp .docker/.env.example .docker/.env
```
2. 构建命令
```bash
cd <path-to-this-repo>
# 构建sky版本APK
docker run --env-file .docker/.env --rm -it -v .:/home/mobiledevops/app mobiledevops/flutter-sdk-image:3.16.4 \
flutter build apk --release --flavor sky -t lib/main_sky_full.dart
```
3. 构建完成后APK文件在build/app/outputs/flutter-apk目录下
### 代理设置
```bash
docker run --rm -it -v .:/home/mobiledevops/app -e http_proxy=http://
```
## 排除故障
测试谷歌连接
```bash
# flutter以及maven 下载地址是否正常
curl -i https://storage.googleapis.com/flutter_infra_release/
```