updated docker error
This commit is contained in:
30
Dockerfile
30
Dockerfile
@@ -1,11 +1,35 @@
|
|||||||
# Flutter web build, served as static files by nginx.
|
# Flutter web build, served as static files by nginx.
|
||||||
#
|
#
|
||||||
# Dokploy builds this repo with its Dockerfile provider, so the image does the
|
# Dokploy builds this repo with its Dockerfile provider, so the image does the
|
||||||
# whole job: pull the Flutter SDK, compile the web bundle, hand the output to a
|
# whole job: install the Flutter SDK, compile the web bundle, hand the output to
|
||||||
# web server. Nothing from the build stage survives into the final image but
|
# a web server. Nothing from the build stage survives into the final image but
|
||||||
# build/web.
|
# build/web.
|
||||||
|
#
|
||||||
|
# The SDK comes from the official archive at a pinned version rather than from a
|
||||||
|
# `flutter:stable` image: those images trail the real stable channel, and the
|
||||||
|
# one tagged stable ships a Dart older than the SDK floor in pubspec.yaml, so
|
||||||
|
# `pub get` refuses to resolve. Keep FLUTTER_VERSION in step with the toolchain
|
||||||
|
# the app is developed against.
|
||||||
|
|
||||||
FROM ghcr.io/cirruslabs/flutter:stable AS build
|
FROM debian:bookworm-slim AS build
|
||||||
|
|
||||||
|
ARG FLUTTER_VERSION=3.44.9
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
ca-certificates curl git unzip xz-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${FLUTTER_VERSION}-stable.tar.xz" \
|
||||||
|
| tar -xJ -C /opt
|
||||||
|
|
||||||
|
ENV PATH="/opt/flutter/bin:${PATH}"
|
||||||
|
|
||||||
|
# The SDK is a git checkout owned by a different user than the one building, so
|
||||||
|
# without this every flutter command dies on git's dubious-ownership check.
|
||||||
|
RUN git config --global --add safe.directory /opt/flutter \
|
||||||
|
&& flutter config --disable-analytics \
|
||||||
|
&& flutter precache --web
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user