Skip to content

Commit

Permalink
chore(blackduck): run scan as root
Browse files Browse the repository at this point in the history
SUITEDEV-35556
  • Loading branch information
matusekma committed Apr 30, 2024
1 parent 6f38af4 commit 129038e
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions Dockerfile.codescan
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
FROM debian:12.5

ARG FLUTTER_SDK=/workspace/source/flutter
ARG FLUTTER_SDK=/usr/local/flutter
ARG FLUTTER_VERSION=3.16.9

COPY . /workspace/source
WORKDIR /workspace/source

# install all needed stuff
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 /home

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

Expand All @@ -22,12 +20,10 @@ RUN cd $FLUTTER_SDK && git fetch && git checkout $FLUTTER_VERSION
ENV PATH="$FLUTTER_SDK/bin:$FLUTTER_SDK/bin/cache/dart-sdk/bin:${PATH}"

RUN cd /workspace/source
COPY . /workspace/source
RUN flutter doctor

RUN chown -R nonroot:nonroot /workspace/source
RUN flutter doctor

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


0 comments on commit 129038e

Please sign in to comment.