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 91ad18e commit a51d7a3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Dockerfile.codescan
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ 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 @@ -27,6 +23,12 @@ 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
RUN chown -R nonroot:nonroot /home/nonroot/.config
USER nonroot

# remove unnecessary files
CMD flutter pub get && cat pubspec.lock && rm -rf example

Expand Down

0 comments on commit a51d7a3

Please sign in to comment.