From 9827ab7de31b7560c30a75693654db875af29148 Mon Sep 17 00:00:00 2001 From: ange Date: Sat, 9 Nov 2024 14:36:45 +0800 Subject: [PATCH] fix: android licenses --- Dockerfile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5d104fb..307d749 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,17 @@ FROM docker.io/debian:12-slim as build RUN apt-get update \ && apt-get install -y --no-install-recommends \ + sdkmanager \ xz-utils \ && rm -rf /var/lib/apt/lists/* ADD https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.24.4-stable.tar.xz /flutter.tar.xz RUN tar -C /opt/ --exclude=cache -xJf /flutter.tar.xz +RUN sdkmanager \ + "build-tools;35.0.0" \ + "cmdline-tools;9.0" \ + "platform-tools;35.0.2" \ + "platforms;android-35" \ + && yes | sdkmanager --licenses FROM docker.io/debian:12-slim RUN useradd -m app @@ -13,17 +20,11 @@ RUN apt-get update \ curl \ git \ openjdk-17-jdk-headless \ - sdkmanager \ unzip \ && rm -rf /var/lib/apt/lists/* -RUN sdkmanager \ - "build-tools;35.0.0" \ - "cmdline-tools;9.0" \ - "platform-tools;35.0.2" \ - "platforms;android-35" COPY --from=build --chown=app:app /opt/ /opt/ USER app ENV PATH="/opt/flutter/bin:$PATH" -RUN flutter config --android-sdk /opt/android-sdk/ \ - && flutter doctor --android-licenses +RUN flutter config --android-sdk /opt/android-sdk/ RUN flutter doctor +ENTRYPOINT ["flutter"]