diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..617e364 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +# Use the official Flutter SDK image +FROM cirrusci/flutter:latest + +# Set the working directory +WORKDIR /app + +# Copy the pubspec.yaml and install dependencies +COPY pubspec.yaml pubspec.lock ./ +RUN flutter pub get + +# Copy the rest of the application code +COPY . . + +# Build the Flutter app for Android +RUN flutter build apk --release + +# Use the following entrypoint if you want to run the app in a container +# ENTRYPOINT ["flutter", "run", "--release"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8a9b978 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3.8' + +services: + flutter: + build: + context: . + dockerfile: Dockerfile + volumes: + - .:/app # Link the current directory to /app in the container + environment: + - FLUTTER_FLAVOR=prod # Example environment variable, adjust as needed + command: flutter build apk --release # You can run any Flutter command here