feat: aggiungi container Docker dev e build per Flutter
docker/build/: build headless APK Android - Dockerfile: Ubuntu 22.04 + Java 17 + Flutter stable + Android SDK - build.sh: genera android/ automaticamente se mancante, poi flutter build apk; --release aggiunge zipalign + apksigner docker/dev/: ambiente di sviluppo web con hot reload - Dockerfile: Ubuntu 22.04 + Flutter stable (solo web, senza Android SDK) - docker-compose.yml: espone porta 5173, monta il progetto come volume - entrypoint.sh: inizializza web/ se mancante, flutter pub get, flutter run -d web-server su 0.0.0.0:5173 docker/README.md: documentazione aggiornata per entrambi i container; rimossi Dockerfile e build.sh Vue/Capacitor non più usati. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
FLUTTER_HOME=/opt/flutter \
|
||||
PATH="/opt/flutter/bin:${PATH}"
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl git unzip xz-utils ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN git clone --depth 1 --branch stable \
|
||||
https://github.com/flutter/flutter.git /opt/flutter && \
|
||||
flutter config --no-analytics --enable-web && \
|
||||
flutter precache --web
|
||||
|
||||
WORKDIR /workspace
|
||||
@@ -0,0 +1,14 @@
|
||||
services:
|
||||
dev:
|
||||
build: .
|
||||
ports:
|
||||
- "5173:5173"
|
||||
volumes:
|
||||
- ../../:/workspace
|
||||
- pub-cache:/root/.pub-cache
|
||||
command: bash /workspace/docker/dev/entrypoint.sh
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
||||
volumes:
|
||||
pub-cache:
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Aggiunge supporto web se mancante (crea solo web/, non tocca lib/)
|
||||
if [[ ! -d /workspace/web ]]; then
|
||||
echo "→ Inizializzazione supporto web..."
|
||||
flutter create . --platforms=web
|
||||
fi
|
||||
|
||||
flutter pub get
|
||||
exec flutter run -d web-server --web-hostname=0.0.0.0 --web-port=5173
|
||||
Reference in New Issue
Block a user