diff --git a/Dockerfile.codescan b/Dockerfile.codescan index 2bb2889..0539fdf 100644 --- a/Dockerfile.codescan +++ b/Dockerfile.codescan @@ -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 @@ -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