From 8915a35ef84c24a8168d3912d6490a86fdec886b Mon Sep 17 00:00:00 2001
From: Ichlasul Affan <ichlasul.affan@ui.ac.id>
Date: Mon, 17 Feb 2020 17:48:57 +0700
Subject: [PATCH] Use lighter base image

---
 Dockerfile | 28 ++++++++++------------------
 1 file changed, 10 insertions(+), 18 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 743c0aa..57a16ce 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,22 +1,19 @@
-FROM runmymind/docker-android-sdk:latest
-
-WORKDIR /workspace
+FROM cirrusci/flutter:latest
 
 # Avoid warnings by switching to noninteractive
 ENV DEBIAN_FRONTEND=noninteractive
 
+# Setup workspace folder
+RUN mkdir workspace
+WORKDIR workspace
+
 # Install packages
-RUN apt-get update \
-    && apt-get -y install --no-install-recommends apt-transport-https ca-certificates git nodejs unzip wget xz-utils \
-    # Install Dart
-    && sh -c 'wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -' \
-    && sh -c 'wget -qO- 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 install -y dart \
+RUN sudo apt-get update \
+    && sudo apt-get -y install --no-install-recommends ca-certificates git nodejs unzip wget xz-utils \
     # Clean up
-    && apt-get autoremove -y \
-    && apt-get clean -y \
-    && rm -rf /var/lib/apt/lists/*
+    && sudo apt-get autoremove -y \
+    && sudo apt-get clean -y \
+    && sudo rm -rf /var/lib/apt/lists/*
 
 # Configure Sonar Scanner CLI
 ARG SONAR_SCANNER_CLI_VERSION=4.0.0.1744
@@ -35,11 +32,6 @@ RUN wget -qO /opt/shellcheck-${SHELLCHECK_VERSION}.tar.xz https://shellcheck.sto
     && chmod +x /opt/shellcheck-${SHELLCHECK_VERSION}/shellcheck \
     && ln -s /opt/shellcheck-${SHELLCHECK_VERSION}/shellcheck /usr/local/bin/shellcheck
 
-# Install Flutter
-ARG FLUTTER_VERSION="https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_v1.12.13+hotfix.8-stable.tar.xz"
-ENV PATH="$PATH:/usr/lib/dart/bin:/flutter/bin"
-RUN wget --quiet --output-document=flutter.tar.xz $FLUTTER_VERSION && tar xf flutter.tar.xz -C /
-
 # Switch back to dialog for any ad-hoc use of apt-get
 ENV DEBIAN_FRONTEND=''
 
-- 
GitLab