fix: simplify Dockerfile by removing user creation and ownership commands

This commit is contained in:
Nils-Johan Gynther
2026-04-21 22:05:18 +02:00
parent ebb749383c
commit 4efc15bc2c
+2 -7
View File
@@ -3,15 +3,10 @@ FROM ghcr.io/cirruslabs/flutter:stable AS builder
WORKDIR /app
RUN useradd -m -u 10001 flutteruser
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
COPY pubspec.yaml pubspec.lock* ./
RUN flutter pub get
COPY --chown=flutteruser:flutteruser . .
COPY . .
# Inject API base URL at build time via --dart-define.
# Default to same-origin /api to avoid mixed-content in HTTPS deployments.