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 ๐คฏ
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 ๐ฅ
by default, docker-flutter will run the flutter doctor
command to show you everything is working
docker run -it ethernetz/docker-flutter
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
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"]
}
once your dev environment is set up, it just takes 2 commands to see your flutter app in an android emulator
/start.sh
flutter run -d emulator-5554