build: rendi la build Docker riproducibile
- Pinna Flutter a 3.41.9 (ARG FLUTTER_VERSION) in entrambi i Dockerfile
- Aggiunge /opt/android-sdk/build-tools/34.0.0 al PATH (zipalign era missing)
- Sostituisce mount ${HOME}/.gradle con named volume gradle-cache
- Aggiunge --enforce-lockfile a flutter pub get per bloccare le dipendenze
- Aggiunge .flutter-version con la versione Flutter attesa
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
ARG FLUTTER_VERSION=3.41.9
|
||||
ARG ANDROID_SDK_BUILD=11076708
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
FLUTTER_HOME=/opt/flutter \
|
||||
ANDROID_SDK_ROOT=/opt/android-sdk \
|
||||
JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 \
|
||||
PATH="/opt/flutter/bin:/opt/android-sdk/cmdline-tools/latest/bin:/opt/android-sdk/platform-tools:${PATH}"
|
||||
PATH="/opt/flutter/bin:/opt/android-sdk/cmdline-tools/latest/bin:/opt/android-sdk/platform-tools:/opt/android-sdk/build-tools/34.0.0:${PATH}"
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl wget git unzip xz-utils ca-certificates \
|
||||
openjdk-17-jdk \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN git clone --depth 1 --branch stable \
|
||||
RUN git clone --depth 1 --branch ${FLUTTER_VERSION} \
|
||||
https://github.com/flutter/flutter.git ${FLUTTER_HOME} && \
|
||||
flutter config --no-analytics && \
|
||||
flutter precache --android
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
ARG FLUTTER_VERSION=3.41.9
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
FLUTTER_HOME=/opt/flutter \
|
||||
PATH="/opt/flutter/bin:${PATH}"
|
||||
@@ -8,7 +10,7 @@ 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 \
|
||||
RUN git clone --depth 1 --branch ${FLUTTER_VERSION} \
|
||||
https://github.com/flutter/flutter.git /opt/flutter && \
|
||||
flutter config --no-analytics --enable-web && \
|
||||
flutter precache --web
|
||||
|
||||
Reference in New Issue
Block a user