flutter/Dockerfile

32 lines
1.0 KiB
Docker
Raw Normal View History

2024-12-16 12:58:38 +00:00
FROM docker.io/debian:12-slim AS build
2024-11-14 10:42:58 +00:00
ENV DEBIAN_FRONTEND=noninteractive
2024-11-09 04:36:41 +00:00
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
2024-11-09 06:36:45 +00:00
sdkmanager \
2024-11-09 04:36:41 +00:00
xz-utils \
&& rm -rf /var/lib/apt/lists/*
2024-12-17 02:22:43 +00:00
ADD https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.27.0-stable.tar.xz /flutter.tar.xz
2024-12-16 12:58:38 +00:00
RUN tar --no-same-owner -C /opt/ -xJf /flutter.tar.xz
2024-11-09 06:36:45 +00:00
RUN sdkmanager \
"build-tools;35.0.0" \
"cmdline-tools;9.0" \
"platform-tools;35.0.2" \
"platforms;android-35"
2024-11-09 04:36:41 +00:00
FROM docker.io/debian:12-slim
2024-11-14 10:42:58 +00:00
ENV DEBIAN_FRONTEND=noninteractive
RUN touch /.dockerenv
2024-11-09 04:36:41 +00:00
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
git \
2024-11-09 05:58:14 +00:00
openjdk-17-jdk-headless \
2024-11-09 04:36:41 +00:00
unzip \
&& rm -rf /var/lib/apt/lists/*
2024-12-16 12:58:38 +00:00
COPY --from=build /opt/ /opt/
2024-11-09 05:53:35 +00:00
ENV PATH="/opt/flutter/bin:$PATH"
RUN flutter config --android-sdk /opt/android-sdk/ \
&& yes | flutter doctor --android-licenses > /dev/null
2024-11-14 09:52:59 +00:00
WORKDIR /app/
2024-11-09 06:36:45 +00:00
ENTRYPOINT ["flutter"]