This is a docker image for flutter.
This image is useful for pipelines build on CI.
-
Run a docker container with this image:
Eg.
docker run -ti --name flutter-container ingluife/flutter:latest
-
Add the tag image on a pipeline file setting:
Gitlab example: .gitlab-ci.yml
image: ingluife/flutter:latest
before_script:
- flutter pub get
- echo sdk.dir=/opt/android-sdk/ > android/local.properties
- echo flutter.sdk=/opt/flutter >> android/local.properties
- cd android && gradle wrapper && cd -
- chmod +x ./gradlew
stages:
- test
- build
test:android:
stage: test
script:
- cd android
- ./gradlew -Pci --console=plain :app:testDebug
build:apk:
stage: build
script:
- flutter build apk
artifacts:
paths:
- build/app/outputs/apk
build:bundle:
stage: build
script:
- flutter build appbundle
artifacts:
paths:
- build/app/outputs/bundle
test:flutter:
stage: test
script:
- flutter test
This image has these components installed and configured:
- Flutter
- Path:
/opt/flutter
- Path:
- Android SDK
- Path:
/opt/android-sdk
- Path:
- Gradle
- Path:
/opt/gradle
- Path: