From 4bc4aed4759dd2dee09d06b2c37d70692033cd01 Mon Sep 17 00:00:00 2001 From: Ichlasul Affan <ichlaffterlalu@gmail.com> Date: Mon, 17 Feb 2020 12:16:37 +0700 Subject: [PATCH] Install Flutter after defining user and workdir --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index a709344..026ba93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,11 @@ RUN apt-get update \ && apt-get clean -y \ && rm -rf /var/lib/apt/lists/* +## 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 + # Configure Sonar Scanner CLI ARG SONAR_SCANNER_CLI_VERSION=4.0.0.1744 RUN wget -qO sonar-scanner-cli.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_CLI_VERSION-linux.zip \ @@ -49,10 +54,7 @@ RUN wget --quiet --output-document=flutter.tar.xz $FLUTTER_VERSION && tar xf flu # Switch back to dialog for any ad-hoc use of apt-get ENV DEBIAN_FRONTEND='' -## 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 +# Define default command to be run CMD ["sonar-scanner"] # Container image metadata -- GitLab