# Example: Flutter web build image using base-distro # # Usage in flutter-admin-console or other Flutter web projects: # FROM svrnty/base-distro:flutter-sdk-latest AS build # ... (install Flutter SDK, build web app) ... FROM svrnty/base-distro:flutter-sdk-latest AS build # Install Flutter SDK on top of the base USER root ARG FLUTTER_VERSION=3.38.9 RUN curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${FLUTTER_VERSION}-stable.tar.xz" \ -o /tmp/flutter.tar.xz && \ mkdir -p /opt && \ tar xf /tmp/flutter.tar.xz -C /opt && \ rm /tmp/flutter.tar.xz && \ git config --global --add safe.directory /opt/flutter && \ flutter config --enable-web \ --no-enable-android --no-enable-ios \ --no-enable-linux-desktop --no-enable-macos-desktop \ --no-enable-windows-desktop && \ flutter precache --web \ --no-android --no-ios --no-linux \ --no-macos --no-windows --no-fuchsia --no-universal && \ chown -R 65532:65532 /opt/flutter USER 65532 WORKDIR /app COPY . . RUN flutter pub get && flutter build web --wasm --release