Fakultas Ilmu Komputer UI
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sonar Scanner CLI Image for Flutter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Daya Adianto
Sonar Scanner CLI Image for Flutter
Commits
39c9645b
Commit
39c9645b
authored
5 years ago
by
Ichlasul Affan
Browse files
Options
Downloads
Patches
Plain Diff
Use root instead of custom non-root user
parent
d23b9414
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+2
-13
2 additions, 13 deletions
Dockerfile
with
2 additions
and
13 deletions
Dockerfile
+
2
−
13
View file @
39c9645b
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"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment