docker-flutter-arm64/Dockerfile

20 lines
680 B
Docker
Raw Permalink Normal View History

2023-10-07 20:54:56 +00:00
FROM debian:bookworm-20230919-slim
# The version of Flutter to use
ARG FLUTTER_VERSION
2023-10-07 21:16:17 +00:00
# Add Flutter to the PATH
2023-10-07 20:54:56 +00:00
ENV PATH="$PATH:/opt/flutter/bin"
2023-10-07 21:16:17 +00:00
# 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.
2023-10-07 20:54:56 +00:00
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
2023-10-07 21:16:17 +00:00
# Pre-cache dependencies
2023-10-07 20:54:56 +00:00
RUN flutter precache && \
rm -rf /var/lib/apt/lists/*