Skip to content

Commit

Permalink
chore(blackduck): add permission to nonroot user
Browse files Browse the repository at this point in the history
SUITEDEV-35556
  • Loading branch information
matusekma committed Apr 29, 2024
1 parent 1e4807e commit fa0ddd1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Dockerfile.codescan
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ WORKDIR /workspace/source
RUN apt-get update
RUN apt-get install -y curl git unzip

RUN groupadd -r nonroot && useradd -r -s /bin/false -g nonroot nonroot
RUN chown -R nonroot:nonroot /workspace/source
USER nonroot

#clone flutter
RUN git clone https://github.com/flutter/flutter.git $FLUTTER_SDK

Expand All @@ -23,12 +27,7 @@ RUN cd /workspace/source

RUN flutter doctor

RUN groupadd -r nonroot && useradd -r -s /bin/false -g nonroot nonroot
RUN chown -R nonroot:nonroot /workspace/source
RUN chown -R nonroot:nonroot /usr/local/flutter
USER nonroot

# remove unnecessary files
CMD chown -R nonroot:nonroot /home/nonroot/.config && flutter pub get && cat pubspec.lock && rm -rf example
CMD flutter pub get && cat pubspec.lock && rm -rf example


0 comments on commit fa0ddd1

Please sign in to comment.