fix: update Dockerfile to ensure proper user permissions for Flutter build
This commit is contained in:
+5
-2
@@ -3,10 +3,13 @@ FROM ghcr.io/cirruslabs/flutter:stable AS builder
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY pubspec.yaml pubspec.lock* ./
|
RUN useradd -m -u 10001 flutteruser
|
||||||
|
|
||||||
|
COPY --chown=flutteruser:flutteruser pubspec.yaml pubspec.lock* ./
|
||||||
|
USER flutteruser
|
||||||
RUN flutter pub get
|
RUN flutter pub get
|
||||||
|
|
||||||
COPY . .
|
COPY --chown=flutteruser:flutteruser . .
|
||||||
|
|
||||||
# Inject API base URL at build time via --dart-define.
|
# Inject API base URL at build time via --dart-define.
|
||||||
# Default to same-origin /api to avoid mixed-content in HTTPS deployments.
|
# Default to same-origin /api to avoid mixed-content in HTTPS deployments.
|
||||||
|
|||||||
Reference in New Issue
Block a user