How to dockerize your Flutter app

Why should I Dockerize?

That’s the first question that will pop into your head as a Flutter Developer.

Well, here is the deal. As a Flutter Developer, there are tons of installation processes (from Flutter SDK, to Android SDK, toolchain, etc.), which can sometimes turn out to be way too hectic considering all the installation processes. But what if all you had to do was pull a docker image and then work within? Sounds easier, right?

Docker is the best out there because it is lightweight, simple, and users don’t have to worry about scalability.

widget

Getting started

An important pre-requisite is the installation of Docker on your local machine.

  • Go ahead and pull the docker image by running:
docker pull ameysunu/flutterdocker:firstentry
  • Now, run docker images to get your Docker Image ID.

  • With the obtained Image ID, run docker run -i -t IMAGE ID.

  • You can now create or clone a Flutter Repository from Github and try smoke or integration testing on your Flutter App.

If you’d like to use a physical Android device, you can connect it to Docker via WiFi and then debug on it.

Free Resources