Primer intento docker

This commit is contained in:
Álvaro González 2026-01-08 18:47:48 +01:00
parent 13612e7601
commit 4a42dc49d9
2 changed files with 30 additions and 0 deletions

18
Dockerfile Normal file
View file

@ -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"]

12
docker-compose.yml Normal file
View file

@ -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