docker-flutter-arm64/Dockerfile

20 lines
680 B
Docker

FROM debian:bookworm-20230919-slim
# The version of Flutter to use
ARG FLUTTER_VERSION
# Add Flutter to the PATH
ENV PATH="$PATH:/opt/flutter/bin"
# It turns out that the provided tarballs all expect x86 and thus bundle
# the x86 build of Dart, which obviously does not work. Thus, we have to
# fetch the repo from Github and use that instead. Then Flutter fetches the
# correct Dart build and everything should work.
RUN apt-get update && apt-get install -y git curl unzip
RUN mkdir -p /opt && \
git clone --depth=1 -b $FLUTTER_VERSION https://github.com/flutter/flutter.git /opt/flutter
# Pre-cache dependencies
RUN flutter precache && \
rm -rf /var/lib/apt/lists/*