diff --git a/Dockerfile b/Dockerfile
index a709344b8317bf52f653d00f7673c5bcc71f6e7c..026ba93b8befd066ead8616c53ddb17bdc357e99 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