Reading time: < 1 minute
Hello, today we are going to see how we can run the Flutter environment on an ARM64 processor using Docker Compose.
First, let’s create a docker-compose.yml:
version: "3.1" services: flutter: build: context: ./Dockerfile dockerfile: flutter_arm restart: unless-stopped container_name: flutter volumes: - ./app_path:/home/mobiledevops/app networks: - docker-network networks: docker-network: driver: bridge external: true
In the ./app_path directory, you can place the folder of your Flutter APP.
We have created a Docker file in the folder named Dockerfile. Create that folder and add the following content in a file named flutter_arm:
FROM ubuntu:latest RUN apt-get update && \ apt-get install -y curl git wget unzip RUN git clone --depth=1 --branch=stable https://github.com/flutter/flutter.git /usr/local/flutter ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}" RUN flutter channel stable && flutter upgrade WORKDIR /home/mobiledevops/app # Keep the container running CMD ["tail", "-f", "/dev/null"]
With this, we run “docker compose up -d” and our Docker environment is up and running.
Consequently, we can execute "docker compose up -d" and our Docker environment will be up and running.
Hope this helps you set up your Flutter environment on an ARM64 processor using Docker compose. Happy coding!