mod dockerfile
This commit is contained in:
@@ -18,10 +18,11 @@ RUN apt-get update && apt-get install -y \
|
||||
# Install Flutter
|
||||
ENV FLUTTER_HOME=/usr/local/flutter
|
||||
ENV PATH="${FLUTTER_HOME}/bin:${PATH}"
|
||||
ENV TAR_OPTIONS=--no-same-owner
|
||||
|
||||
RUN git clone https://github.com/flutter/flutter.git ${FLUTTER_HOME} -b stable --depth 1 && \
|
||||
flutter config --enable-web --no-analytics && \
|
||||
flutter doctor -v
|
||||
flutter precache --web
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
@@ -34,8 +35,8 @@ RUN flutter pub get
|
||||
|
||||
COPY . .
|
||||
|
||||
# Build web app (downloads web artifacts on-demand without gradle)
|
||||
RUN flutter build web --release --web-renderer canvaskit
|
||||
# Build web app (web-only artifacts; suppress wasm dry-run warnings)
|
||||
RUN flutter build web --release --no-wasm-dry-run
|
||||
|
||||
# Production stage - Nginx
|
||||
FROM nginx:alpine
|
||||
|
||||
Reference in New Issue
Block a user