Open AmirNaghibi opened 2 years ago
This is what I see after running flutter doctor
:
I believe I need to install Android SDK and probably XCode for iPhone? 🤔
Never tried this since I am only using the image to build a flutter web application.
Connecting the device to the container could be done using --device
.
I assume it's pretty hard to run on an iPhone since it would require xCode to build the application. Running on android might be possible by installing android studio.
Mainly for documenting progress
By doing the following it, it is possible to build an apk using this image.
docker run --rm -ti fischerscode/flutter-sudo:stable
sudo apt-get update
sudo apt-get install -y libcanberra-gtk-module android-sdk software-properties-common
curl -o commandlinetools-linux.zip https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip #link from https://developer.android.com/studio#command-tools
sudo mkdir -p /usr/lib/android-sdk/cmdline-tools
sudo unzip -d /usr/lib/android-sdk/cmdline-tools commandlinetools-linux.zip
sudo mv /usr/lib/android-sdk/cmdline-tools/cmdline-tools /usr/lib/android-sdk/cmdline-tools/latest
sudo /usr/lib/android-sdk/cmdline-tools/latest/bin/sdkmanager "platforms;android-29" "build-tools;32.0.0"
flutter create test
cd test
sudo /home/flutter/flutter-sdk/bin/flutter build apk
Great project! I'm using your image and am able to create an app inside a flutter container.
Any tips on how to connect to a device? I have connected my iPad but after running
flutter run
I get an error:Is there any argument I need to pass when running a container? Currently I'm using the following command: