diff --git a/star_lock/.docker/.env.example b/star_lock/.docker/.env.example new file mode 100644 index 00000000..48431d73 --- /dev/null +++ b/star_lock/.docker/.env.example @@ -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" diff --git a/star_lock/.docker/.gitignore b/star_lock/.docker/.gitignore new file mode 100644 index 00000000..4c49bd78 --- /dev/null +++ b/star_lock/.docker/.gitignore @@ -0,0 +1 @@ +.env diff --git a/star_lock/.docker/README.md b/star_lock/.docker/README.md new file mode 100644 index 00000000..0fb1125d --- /dev/null +++ b/star_lock/.docker/README.md @@ -0,0 +1,33 @@ +# docker持续部署 +构建镜像来自:https://github.com/MobileDevOps/flutter-sdk-image/ + +## 使用方法 +1. 复制.env文件,并编辑其中的代理设置 +```bash +cp .docker/.env.example .docker/.env +``` + +2. 构建命令 +```bash +cd + +# 构建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/ +```