fix: simplify Dockerfile by removing user creation and ownership commands
This commit is contained in:
+2
-7
@@ -3,15 +3,10 @@ FROM ghcr.io/cirruslabs/flutter:stable AS builder
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN useradd -m -u 10001 flutteruser
|
COPY pubspec.yaml pubspec.lock* ./
|
||||||
RUN chown -R flutteruser:flutteruser /sdks/flutter/bin/cache
|
|
||||||
|
|
||||||
COPY --chown=flutteruser:flutteruser pubspec.yaml pubspec.lock* ./
|
|
||||||
USER flutteruser
|
|
||||||
RUN git config --global --add safe.directory /sdks/flutter
|
|
||||||
RUN flutter pub get
|
RUN flutter pub get
|
||||||
|
|
||||||
COPY --chown=flutteruser:flutteruser . .
|
COPY . .
|
||||||
|
|
||||||
# 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