Skip to content

feat: Containerization #391

Open
@rohansen856

Description

@rohansen856

Describe your improvement idea or feature request

The repository is not currently containerized. Containerizing the repo would not not only help the developers to run it in different environments effortlessly, but also would help in testing the application. I would like to containerize the repo using docker for different emulators.

How would you like to see it implemented?

  1. use different dockerfile for different emulator devices ex.:
  • Dockerfile.linux for linux emulator
  • Dockerfile.windows for windows emulator
  1. use docker compose for effortlessly setting up the environments with just 1 command

attaching a demo of linux emulator for reference:
docker-compose.yaml

version: "3.9"
 services:
   flutter_linux:
     build:
       context: .
       dockerfile: Dockerfile.linux
     environment:
       - DISPLAY=${DISPLAY}
     volumes:
       - .:/app
     network_mode: "host" # Use host networking
     command: ["bash", "-c", "flutter clean && flutter run -d linux"]

Dockerfile:

 FROM ghcr.io/cirruslabs/flutter:3.24.5
 
 WORKDIR /app
 
 COPY . /app
 
 # Install dependencies for Flutter Linux desktop development
 RUN apt-get update && apt-get install -y \
     libgtk-3-dev \
     libblkid-dev \
     liblzma-dev \
     liblzma5 \
     libnss3 \
     libx11-dev \
     libxkbfile-dev \
     libcurl4-openssl-dev \
     xdg-utils \
     cmake \
     ninja-build \
     clang \
     && apt-get clean
 
 RUN flutter config --enable-linux-desktop
 
 RUN flutter clean
 
 RUN flutter pub get

Put here any screenshots or videos (optional)

No response

How can we contact you (optional)

No response

Would you like to work on this issue?

Yes

By submitting this issue, I have confirmed that:

  • I have starred the repo ⭐ and watched 👀 it on GitHub and followed the contribution guidelines.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions