-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.flutter
37 lines (27 loc) · 1.37 KB
/
Dockerfile.flutter
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
FROM cirrusci/android-sdk:30
ENV TAR_OPTIONS=--no-same-owner
RUN sdkmanager "build-tools;29.0.2" \
&& sdkmanager "build-tools;28.0.3" \
&& sdkmanager "platforms;android-29" \
&& sdkmanager "platforms;android-28" \
&& sdkmanager "platforms;android-27"
ENV DISPLAY :99
RUN sudo apt-get update && yes | sudo apt-get install xvfb && apt-get -y install gpg-agent
# Set the Chrome repo.
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
# Install Chrome.
RUN apt-get update && apt-get -y install google-chrome-stable \
&& sed -i 's/"$@"/"$@" --no-sandbox --disable-dev-shm-usage/g' /opt/google/chrome/google-chrome
ENV FLUTTER_HOME=${HOME}/sdks/flutter \
FLUTTER_VERSION="3.3.6"
ENV FLUTTER_ROOT=$FLUTTER_HOME
ENV PATH ${PATH}:${FLUTTER_HOME}/bin:${FLUTTER_HOME}/bin/cache/dart-sdk/bin
RUN git clone --branch ${FLUTTER_VERSION} https://github.com/flutter/flutter.git ${FLUTTER_HOME}
RUN yes | flutter doctor --android-licenses \
&& flutter doctor \
&& chown -R root:root ${FLUTTER_HOME} \
&& flutter precache --web --android --no-ios --no-universal
ARG GITHUB_TOKEN
RUN git config --global url."https://${GITHUB_TOKEN}:[email protected]/".insteadOf [email protected]: \
&& git config --global url."https://".insteadOf git://