Add non-root flutter user to all SDK images
Check for Flutter SDK Updates / check-update (push) Successful in 2s
Check for Flutter SDK Updates / check-update (push) Successful in 2s
Creates a dedicated flutter user and switches to it as the default. Resolves Docker Scout compliance check for non-root default user. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -52,4 +52,10 @@ RUN flutter precache --linux \
|
||||
|
||||
RUN flutter doctor -v
|
||||
|
||||
# Create non-root user for CI builds
|
||||
RUN groupadd -r flutter && useradd -r -g flutter -m -d /home/flutter flutter && \
|
||||
chown -R flutter:flutter "${FLUTTER_HOME}" /home/flutter
|
||||
|
||||
WORKDIR /app
|
||||
RUN chown flutter:flutter /app
|
||||
USER flutter
|
||||
|
||||
Reference in New Issue
Block a user