Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy to docker a flutter mobile app?

I want to deploy to docker my already built flutter mobile app. I was unable to find a clear tutorial of this exact case using Dockerfile and docker-compose.yaml. any help ??? I want to deploy it on docker and be able to use it on any mobile device by running the app container. Any help will be really appreciated.

like image 697
Houssem Avatar asked Sep 13 '25 08:09

Houssem


1 Answers

Just as an example I'm providing my config file below, here is just a base setup, for more information you can read this article: https://blog.codemagic.io/how-to-dockerize-flutter-apps. Please feel free to ask additional questions.

FROM cirrusci/flutter

RUN sdkmanager --install "platform-tools" "platforms;android-33"

COPY ./android ./app/android
COPY ./assets ./app/assets
COPY ./ios ./app/ios
COPY ./lib ./app/lib
COPY ./analysis_options.yaml ./app
COPY ./pubspec.yaml ./app

RUN cd /app && flutter pub get

WORKDIR /app
like image 150
Oleksii Shtanko Avatar answered Sep 15 '25 01:09

Oleksii Shtanko