-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
executable file
·43 lines (40 loc) · 1.54 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# https://github.com/cirruslabs/docker-images-android/pkgs/container/android-sdk
# https://github.com/cirruslabs/docker-images-android/blob/master/sdk/34/Dockerfile
ARG android_sdk_ver=34
FROM ghcr.io/cirruslabs/android-sdk:${android_sdk_ver}
ARG flutter_ver=3.24.5
ARG build_rev=0
# Install Flutter
ENV FLUTTER_HOME=/usr/local/flutter \
FLUTTER_VERSION=${flutter_ver} \
PATH=$PATH:/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends --no-install-suggests \
ca-certificates \
&& update-ca-certificates \
\
# Install dependencies for Linux toolchain
&& apt-get install -y --no-install-recommends --no-install-suggests \
build-essential \
clang cmake \
lcov \
libgtk-3-dev liblzma-dev \
ninja-build \
pkg-config \
\
# Install Flutter itself
&& curl -fL -o /tmp/flutter.tar.xz \
https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${flutter_ver}-stable.tar.xz \
&& tar -xf /tmp/flutter.tar.xz -C /usr/local/ \
&& git config --global --add safe.directory /usr/local/flutter \
&& flutter config --enable-android \
--enable-linux-desktop \
--enable-web \
--no-enable-ios \
&& flutter precache --universal --linux --web --no-ios \
&& (yes | flutter doctor --android-licenses) \
&& flutter --version \
\
&& rm -rf /var/lib/apt/lists/* \
/tmp/*