Created
October 8, 2019 16:40
-
-
Save tianhaoz95/c9a9151e6e2a5f1ddc29f86e45464253 to your computer and use it in GitHub Desktop.
Dockerfile for doing Flutter development on gitpod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM gitpod/workspace-full:latest | |
ENV ANDROID_HOME=/home/gitpod/android-sdk \ | |
FLUTTER_HOME=/home/gitpod/flutter | |
USER root | |
RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ | |
curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \ | |
apt-get update && \ | |
apt-get -y install build-essential dart libkrb5-dev gcc make gradle android-tools-adb android-tools-fastboot openjdk-8-jdk && \ | |
apt-get clean && \ | |
apt-get -y autoremove && \ | |
apt-get -y clean && \ | |
rm -rf /var/lib/apt/lists/*; | |
USER gitpod | |
RUN cd /home/gitpod && \ | |
wget -qO flutter_sdk.tar.xz \ | |
https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_v1.9.1+hotfix.4-stable.tar.xz &&\ | |
tar -xvf flutter_sdk.tar.xz && \ | |
rm -f flutter_sdk.tar.xz | |
RUN cd /home/gitpod && \ | |
wget -qO android_studio.zip \ | |
https://dl.google.com/dl/android/studio/ide-zips/3.3.0.20/android-studio-ide-182.5199772-linux.zip && \ | |
unzip android_studio.zip && \ | |
rm -f android_studio.zip | |
# TODO(tianhaoz95): make the name of the SDK file into an environment variable to avoid maintainance issue | |
RUN mkdir -p /home/gitpod/android-sdk && \ | |
cd /home/gitpod/android-sdk && \ | |
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip && \ | |
unzip sdk-tools-linux-4333796.zip && \ | |
rm -f sdk-tools-linux-4333796.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment