添加docker镜像构建说明
This commit is contained in:
parent
f96a613ad5
commit
be2290ae80
2
star_lock/.docker/.env.example
Normal file
2
star_lock/.docker/.env.example
Normal 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
1
star_lock/.docker/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.env
|
||||
33
star_lock/.docker/README.md
Normal file
33
star_lock/.docker/README.md
Normal 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/
|
||||
```
|
||||
Loading…
x
Reference in New Issue
Block a user