Docker image and scripts for flutter/rust/android development in vscode.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
chodak166 91f964c9bb Added flutter/rust/android/vscode scripts; updated README file 1 year ago
.devcontainer Added flutter/rust/android/vscode scripts; updated README file 1 year ago
dev-init Added flutter/rust/android/vscode scripts; updated README file 1 year ago
sample_projects Added flutter/rust/android/vscode scripts; updated README file 1 year ago
.gitignore Added flutter/rust/android/vscode scripts; updated README file 1 year ago
Dockerfile Added flutter/rust/android/vscode scripts; updated README file 1 year ago
LICENSE Initial commit 1 year ago
README.md Added flutter/rust/android/vscode scripts; updated README file 1 year ago
docker-compose.yml Added flutter/rust/android/vscode scripts; updated README file 1 year ago
entrypoint.sh Added flutter/rust/android/vscode scripts; updated README file 1 year ago

README.md

Build and configure

Run docker compose build to build the dev container. Then inside the container run selected init scripts. E.g.:

bash /opt/dev-init/dev-init-flutter.sh
bash /opt/dev-init/dev-init-rust.sh
bash /opt/dev-init/dev-init-android.sh

You can skip building the image by pulling chodak166/dev-flutter.

Android SDK, gradle, flutter, rust and vscode data should be preserved as configured in compose file. The /opt/dev-init/dev.env file is also used by docker compose to setup environment variables. See docker-compose.yml and .devcontainer/docker-compose.yml for details.

Compile and debug the app

Use flutter create or sample projects in /opt/sample_projects to perform first build and make gradle download dependencies. Then use flutter run to run the app.

Run and debug in VSCode

With .devcontainer present in root project just run 'Reopen in container' command (ctrl+shift+p) or run dev-flutter-01 manually with:

docker compose run --name dev-flutter-01 -d dev-flutter

After connecting to the container install flutter and dart tools (dart-code.flutter and dart-code.dart-code). Installing toroxx.vscode-avdmanager is also recommended for AVD management.`

AVD UI, flutter commands, dev tools and debug tools should be available from your IDE.

Run and debug USB device

The fluter devices command should identify all connected USB devices along with emulators and system targets with no problem. E.g.:

$ flutter devices
Found 5 connected devices:
  Armor 3 (mobile)             • 3060MF1001017685 • android-arm64  • Android 8.1.0 (API 27)
  BV7100 (mobile)              • BV7100EEA0015872 • android-arm64  • Android 12 (API 31)
  sdk gphone64 x86 64 (mobile) • emulator-5554    • android-x64    • Android 14 (API 34) (emulator)
  Linux (desktop)              • linux            • linux-x64      • Debian GNU/Linux 12 (bookworm) 5.15.0-125-generic
  Chrome (web)                 • chrome           • web-javascript • Google Chrome 131.0.6778.85

export ADB_TRACE=info

In case of any issues try adb kill-server and then adb start-server. Run export ADB_TRACE=all to see verbose output. You can also check open 5037 port with fuser 5037/tcp. Processes using this port can be killed with fuser -k 5037/tcp.