Sign inSign up

alyssuuu/flutter

By alyssuuu

•Updated over 1 year ago

A docker file image with fvm already installed and ready to go

Image
0

108

alyssuuu/flutter repository overview

⁠Maintenance

⁠Reference

A Docker file that comes with:

  • FVM
  • Android SDK
  • Flutter command alias that ensures FVM has a flutter version installed

⁠Usages

You can use this docker image as follows:

docker run -it alyssuuu/flutter:fvm

This will create the docker container that will use the stable version of flutter

If you want to use a specific version of flutter in your container simply use the command:

docker run -it -e FLUTTER_VERSION="<flutter-version>" alyssuuu/flutter:fvm

To use devices and/or emulators is as simple as this:

# Usb devices
docker run -it --device /dev/bus/usb:/dev/bus/usb alyssuuu/flutter:fvm

# Emulators
docker run -it --device /dev/kvm:/dev/kvm alyssuuu/flutter:fvm

Mapping the app data to the container:

docker run -it -v <source>:/app alyssuuu/flutter:fvm

You can also use this image with a docker file:

services:
  app:
    container_name: my-app
    image: alyssuuu/flutter:fvm
    restart: on-failure
    volumes:
      - .:/app # Mounting the app data do my current directory
      - ~/.fvm:/sdk/fvm # Makes the FVM flutter versions visible to IDEs
    environment:
        FLUTTER_VERSION: "3.27.4"
    devices:
      - /dev/bus/usb:/dev/bus/usb
      - /dev/kvm:/dev/kvm
    privileged: true
    command: ["tail", "-f", "/dev/null"] # Ensures the container keeps running
    
volumes:
  app-data:
  fvm-sdk:

Tag summary

Content type

Image

Digest

sha256:8da3c56bc…

Size

726.1 MB

Last updated

over 1 year ago

docker pull alyssuuu/flutter:fvm