-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (30 loc) · 783 Bytes
/
Dockerfile
File metadata and controls
39 lines (30 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# =========================
# STAGE 1 — build
# =========================
FROM ubuntu:22.04 AS builder
RUN apt-get update && apt-get install -y \
curl \
git \
unzip \
xz-utils \
zip \
libglu1-mesa \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
ENV FLUTTER_HOME=/opt/flutter
ENV PATH="$FLUTTER_HOME/bin:$PATH"
RUN git clone https://github.com/flutter/flutter.git -b stable $FLUTTER_HOME
RUN flutter doctor
WORKDIR /app
# Копируем ТОЛЬКО нужное
COPY pubspec.yaml pubspec.lock ./
RUN flutter pub get
COPY . .
RUN flutter build web
# =========================
# STAGE 2 — runtime
# =========================
FROM nginx:alpine
# GitHub Pages / SPA fix
COPY --from=builder /app/build/web /usr/share/nginx/html
EXPOSE 80