-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
27 lines (16 loc) · 811 Bytes
/
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
FROM --platform=$BUILDPLATFORM ubuntu:22.04
RUN apt-get update && \
apt-get install -y bash curl file git unzip xz-utils zip libglu1-mesa cmake && \
rm -rf /var/lib/apt/lists/*
RUN groupadd -r -g 1441 flutter && useradd --no-log-init -r -u 1441 -g flutter -m flutter
USER flutter:flutter
WORKDIR /home/flutter
ARG flutterVersion=stable
ADD https://api.github.com/repos/flutter/flutter/compare/${flutterVersion}...${flutterVersion} /dev/null
RUN git clone https://github.com/flutter/flutter.git -b ${flutterVersion} flutter-sdk
RUN flutter-sdk/bin/flutter precache
RUN flutter-sdk/bin/flutter config --no-analytics
ENV PATH="$PATH:/home/flutter/flutter-sdk/bin"
ENV PATH="$PATH:/home/flutter/flutter-sdk/bin/cache/dart-sdk/bin"
ENV PATH="$PATH:/home/flutter/.pub-cache/bin"
RUN flutter doctor