Skip to content

ethernetz/docker-flutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker-flutter

docker-flutter the perfect ready-to-use flutter dev environment 🥳

inside the container you'll find

  • flutter (duh)
  • android SDK and a device all ready to go
  • noVNC to see play with the emulator in the broswer

all this is happening inside a devcontainer 🤯

image

why would i use this?

you get a consistent dev environement in 1 command, no matter the host machine 😍

spend 0 seconds trying to set up java, android studio, or flutter 🔥

getting started

basic command

by default, docker-flutter will run the flutter doctor command to show you everything is working

docker run -it ethernetz/docker-flutter

image

dev environment

to set up a dev container, you'll also need to

  • volume mount your project in the /developer directory
  • forward port 6080
  • add sleep infinity at the end to make sure the container stays open once its created

the final command should look like this

docker run -it -v "$PWD":/developer -p 6080:6080 ethernetz/docker-flutter sleep infinity

dev container

flutter-docker even works inside a dev container

.devcontainer/devcontainer.json

{
  "image": "ethernetz/docker-flutter:latest",
  "customizations": {
    "vscode": {
      "extensions": ["Dart-Code.flutter", "Dart-Code.dart-code"]
    }
  },
  "forwardPorts": [6080],
  "runArgs": ["--privileged"]
}

running the emulator

once your dev environment is set up, it just takes 2 commands to see your flutter app in an android emulator

start the emulator

/start.sh

image

once the emulator is ready, start the flutter app!

flutter run -d emulator-5554

image

About

flutter dev environment containerized

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published