All Projects → matsp → docker-flutter

matsp / docker-flutter

Licence: MIT license
flutter docker image with full android sdk

Programming Languages

Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to docker-flutter

Awesomedialog
A Beautiful Dialog Library for Kotlin Android
Stars: ✭ 163 (-29.13%)
Mutual labels:  android-sdk
Why bump android minsdk
Why you should bump your Android app minsdk?
Stars: ✭ 226 (-1.74%)
Mutual labels:  android-sdk
Wifi-Connect
A library project to connect two devices using Wifi-Direct
Stars: ✭ 94 (-59.13%)
Mutual labels:  android-sdk
Qiscus Sdk Android
Qiscus provide everything you need to power up your app with chats. And it's now made simple.
Stars: ✭ 175 (-23.91%)
Mutual labels:  android-sdk
Modern Android Development
Modern Android Development tools & key points
Stars: ✭ 219 (-4.78%)
Mutual labels:  android-sdk
Myokhttp
对Okhttp3进行二次封装,对外提供了POST请求、GET请求、PATCH请求、PUT请求、DELETE请求、上传文件、下载文件、取消请求、Raw/Json/Gson返回、后台下载管理等功能
Stars: ✭ 236 (+2.61%)
Mutual labels:  android-sdk
Restcomm Android Sdk
Android Mobile SDK to easily integrate communication features (WebRTC, messaging, presence, voice, video, screensharing) based on RestComm into native Mobile Applications
Stars: ✭ 139 (-39.57%)
Mutual labels:  android-sdk
geopackage-android-map
GeoPackage Android Map Library
Stars: ✭ 26 (-88.7%)
Mutual labels:  android-sdk
Material Backdrop
A simple solution for implementing Backdrop pattern for Android
Stars: ✭ 221 (-3.91%)
Mutual labels:  android-sdk
ValidUtil
No description or website provided.
Stars: ✭ 23 (-90%)
Mutual labels:  android-sdk
Swarmer
Reactive tool to create and start multiple Android Emulators in parallel.
Stars: ✭ 203 (-11.74%)
Mutual labels:  android-sdk
Venom
A lightweight tool that simplifies testing of the process death scenario.
Stars: ✭ 218 (-5.22%)
Mutual labels:  android-sdk
epsAndroidPlayer
易居PGC直播Saas平台Android播放器SDK,Android平台原生播放器,性能高,画质好,直播延迟最低可达1秒。支持HLS,RTMP等流媒体协议,支持H264,AAC音视频编码技术。可灵活设置画幅,显示方向。
Stars: ✭ 13 (-94.35%)
Mutual labels:  android-sdk
Docker Android Sdk
Stars: ✭ 171 (-25.65%)
Mutual labels:  android-sdk
Android-Clean-Architecture
This is a sample movie list Android application built to demonstrate use of Clean Architecture tools. Dedicated to all Android Developers - (Kotlin, MVVM, Clean Architecture, Rx-Java, Dagger, OkHttp, Unit Testing, SOLID principles, Code Coverage)
Stars: ✭ 268 (+16.52%)
Mutual labels:  android-sdk
Vassonic
VasSonic is a lightweight and high-performance Hybrid framework developed by tencent VAS team, which is intended to speed up the first screen of websites working on Android and iOS platform.
Stars: ✭ 11,466 (+4885.22%)
Mutual labels:  android-sdk
Biometric Auth Sample
Add Biometric Authentication to any Android app
Stars: ✭ 232 (+0.87%)
Mutual labels:  android-sdk
android-tools
Android tools built for Android devices.
Stars: ✭ 129 (-43.91%)
Mutual labels:  android-sdk
kin-ecosystem-android-sdk
Home of the Kin Ecosystem mobile sdk for Android
Stars: ✭ 30 (-86.96%)
Mutual labels:  android-sdk
chef-android-sdk
Development repository for Android SDK Chef Cookbook
Stars: ✭ 26 (-88.7%)
Mutual labels:  android-sdk

docker-flutter

With this docker image you don't need to install the Flutter and Android SDK on your developer machine. Everything is ready to use inclusive an emulator device (Pixel with Android 9). With a shell alias you won't recognize a difference between the image and a local installation. If you are using VSCode you can also use this image as your devcontainer.

Supported tags

Entrypoints

  • flutter (default)
  • flutter-android-emulator
  • flutter-web

Dependencies

When you want to run the flutter-android-emulator entrypoint your host must support KVM and have xhost installed.

flutter (default)

Executing e.g. flutter help in the current directory (appended arguments are passed to flutter in the container):

docker run --rm -e UID=$(id -u) -e GID=$(id -g) --workdir /project -v "$PWD":/project matspfeiffer/flutter help

When you don't set the UID and GID the files will be owned by G-/UID=1000.

flutter (connected usb device)

Connecting to a device connected via usb is possible via:

docker run --rm -e UID=$(id -u) -e GID=$(id -g) --workdir /project -v "$PWD":/project --device=/dev/bus -v /dev/bus/usb:/dev/bus/usb matspfeiffer/flutter devices

flutter-android-emulator

To achieve the best performance we will mount the X11 directory, DRI and KVM device of the host to get full hardware acceleration:

xhost local:$USER && docker run --rm -ti -e UID=$(id -u) -e GID=$(id -g) -p 42000:42000 --workdir /project --device /dev/kvm --device /dev/dri:/dev/dri -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY -v "$PWD":/project --entrypoint flutter-android-emulator  matspfeiffer/flutter

flutter-web

You app will be served on localhost:8090:

docker run --rm -ti -e UID=$(id -u) -e GID=$(id -g) -p 42000:42000 -p 8090:8090  --workdir /project -v "$PWD":/project --entrypoint flutter-web matspfeiffer/flutter

VSCode devcontainer

You can also use this image to develop inside a devcontainer in VSCode and launch the android emulator or web-server. The android emulator need hardware acceleration, so their is no best practice for all common operating systems.

Linux #1 (X11 & KVM forwarding)

For developers using Linux as their OS I recommend this approach, because it's the overall cleanest way.

Add this .devcontainer/devcontainer.json to your VSCode project:

{
  "name": "Flutter",
  "image": "matspfeiffer/flutter",
  "extensions": ["dart-code.dart-code", "dart-code.flutter"],
  "runArgs": [
    "--device",
    "/dev/kvm",
    "--device",
    "/dev/dri:/dev/dri",
    "-v",
    "/tmp/.X11-unix:/tmp/.X11-unix",
    "-e",
    "DISPLAY"
  ]
}

When VSCode has launched your container you have to execute flutter emulators --launch flutter_emulator to startup the emulator device. Afterwards you can choose it to debug your flutter code.

Linux #2, Windows & MacOS (using host emulator)

Add this .devcontainer/devcontainer.json to your VSCode project:

{
  "name": "Flutter",
  "image": "matspfeiffer/flutter",
  "extensions": ["dart-code.dart-code", "dart-code.flutter"]
}

Start your local android emulator. Afterwards reconnect execute the following command to make it accessable via network:

adb tcpip 5555

In your docker container connect to device:

adb connect host.docker.internal:5555

You can now choose the device to start debugging.

FAQ

Why not using alpine?

Alpine is based on musl instead of glibc. The dart binaries packaged by flutter are linked against glibc so the Flutter SDK is not compatible with Alpine - it's possible to fix this but not the core attempt of this image.

Why OpenJDK 8?

With higher versions the sdkmanager of the android tools throws errors while fetching maven dependencies.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].