-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
38 lines (26 loc) · 874 Bytes
/
Dockerfile
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
FROM fischerscode/flutter:3.22.0 as ci
ARG test=off
COPY --chown=flutter:flutter ./ ./you
#RUN echo 'Please use china net, Because we use flutter-io.cn host_mirror'
#ENV PUB_HOSTED_URL="https://pub.flutter-io.cn"
#ENV FLUTTER_STORAGE_BASE_URL="https://storage.flutter-io.cn"
WORKDIR ./you
RUN ./bake install
RUN if [[ "$test" = "on" ]]; then ./bake test ; fi
RUN ./bake build
RUN pwd
RUN ls -l
#
######################################################################
# package
######################################################################
FROM nginx:1.23.4 as nginx
# ref:
# https://github.com/nginxinc/docker-nginx/blob/master/mainline
COPY --from=ci /home/flutter/you/notes/flutter_web/build/web /usr/share/nginx/html/
# The port that your application listens to.
EXPOSE 443
EXPOSE 80
# WORKDIR /app
RUN rm /etc/nginx/conf.d/*
COPY nginx/ /etc/nginx/