A modern and ready-to-use Flutter development environment with Docker support that supports Android, Web, and other platforms. You can easily start multi-platform Flutter development using Docker and pre-configured scripts.
- Dockerized Flutter environment (no need to install Flutter locally)
- Includes Android SDK and build tools
- Ready for Android, Web, and other Flutter platforms
- Sample project in the
example/
folder
git clone https://github.com/mohammadtaghipour/Flutter-NebulaKit.git
cd Flutter-NebulaKit
docker-compose up --build
This command builds the Docker image and launches a container with all pre-installed tools.
docker exec -it flutter-dev bash
Inside the container, you can use Flutter as usual:
flutter doctor
flutter pub get
flutter run -d web-server
flutter run -d android
- Install Visual Studio Code
- Install the Remote - Containers extension in VSCode
- Install Docker Desktop
- Open VSCode
- Press
F1
to open the command palette - Type
Remote-Containers: Open Folder in Container
and select it - Select the
Flutter-NebulaKit
project folder - Wait for VSCode to build the container environment and connect to it
This process automatically:
- Uses the main
docker-compose.yml
and.devcontainer/docker-compose.yml
files - Sets up a complete development environment with Flutter and Android SDK
- Mounts the project folder as a workspace in the container
After connecting, you can:
- Use the VSCode terminal to run Flutter commands
- Benefit from all VSCode features like IntelliSense, debugging, etc.
- Develop without needing to install Flutter or Android SDK on your system
Dockerfile
– Docker image for Flutter + Android SDKdocker-compose.yml
– Compose file for easy setup.devcontainer/
– Settings for VSCode development environmentexample/
– Sample Flutter applicationsrc/
– Place your source code here
- Connect your Android device to your computer with a USB cable
- Make sure the "USB debugging" option is enabled in the device's developer settings
- The ADB port (
5037
) should be accessible as configured indocker-compose.yml
# List available devices
flutter devices
# Run the app on Android device
flutter run -d android
# Build APK file for release
flutter build apk --release
# Path to the built APK file
# example/build/app/outputs/flutter-apk/app-release.apk
- Make sure port
8000
is available for web preview - Run the following command:
flutter run -d web-server --web-port 8000
- Go to
http://localhost:8000
in your browser
# Build web version for release
flutter build web --release
# Path to the built files
# example/build/web/
- Make sure USB debugging is enabled
- Run the
adb devices
command to see if the device is detected - If the device is not detected, restart the container with the following command:
docker-compose down && docker-compose up
- Make sure internet connection is established
- Run the following command:
cd example/android && ./gradlew clean
- Then run the app again
If you encounter strange errors, clear the cache:
flutter clean
flutter pub get
Please open an issue if you encounter any problems or have questions, or contribute to improving this project!