From 39c9645bec77f0011b42c9d9e35aabf38ad385d0 Mon Sep 17 00:00:00 2001
From: Ichlasul Affan <ichlaffterlalu@gmail.com>
Date: Mon, 17 Feb 2020 13:10:56 +0700
Subject: [PATCH] Use root instead of custom non-root user

---
 Dockerfile | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index b11f02a..743c0aa 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,19 +1,13 @@
 FROM runmymind/docker-android-sdk:latest
 
+WORKDIR /workspace
+
 # Avoid warnings by switching to noninteractive
 ENV DEBIAN_FRONTEND=noninteractive
 
-# Or your actual UID, GID on Linux if not the default 1000
-ARG USERNAME=sonar
-ARG USER_UID=2000
-ARG USER_GID=$USER_UID
-
 # Install packages
 RUN apt-get update \
     && apt-get -y install --no-install-recommends apt-transport-https ca-certificates git nodejs unzip wget xz-utils \
-    # Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
-    && groupadd --gid $USER_GID $USERNAME \
-    && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
     # 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' \
@@ -41,11 +35,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
 
-## Note to editors: Make sure name of USER and its WORKDIR path matches with
-## the value of USERNAME above
-USER $USERNAME
-WORKDIR /home/$USERNAME/workspace
-
 # 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"
-- 
GitLab