-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
37 lines (27 loc) · 1.29 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
FROM ubuntu:18.04
ENV ANDROID_HOME="/opt/android-sdk" \
PATH="/opt/android-sdk/tools/bin:/opt/flutter/bin:/opt/flutter/bin/cache/dart-sdk/bin:$PATH"
RUN apt-get update > /dev/null \
&& apt-get -y install --no-install-recommends curl git lib32stdc++6 openjdk-8-jdk-headless unzip > /dev/null \
&& apt-get --purge autoremove > /dev/null \
&& apt-get autoclean > /dev/null \
&& rm -rf /var/lib/apt/lists/*
RUN git clone -b dev https://github.com/flutter/flutter.git /opt/flutter \
&& cd /opt/flutter \
&& git reset --hard $(git rev-list -1 $(git describe --tags @{u}))
RUN curl -s -O https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip \
&& mkdir /opt/android-sdk \
&& unzip sdk-tools-linux-4333796.zip -d /opt/android-sdk > /dev/null \
&& rm sdk-tools-linux-4333796.zip
RUN mkdir ~/.android \
&& echo 'count=0' > ~/.android/repositories.cfg \
&& yes | sdkmanager --licenses > /dev/null \
&& sdkmanager "tools" "build-tools;29.0.0" "platforms;android-29" "platform-tools" > /dev/null \
&& yes | sdkmanager --licenses > /dev/null \
&& flutter doctor -v \
&& chown -R root:root /opt
RUN ["apt-get", "update"]
RUN ["apt-get", "install", "-y", "vim"]
RUN ["apt-get", "install", "psmisc"]
WORKDIR /home/project
CMD tail -f /dev/null