-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
38 lines (27 loc) · 960 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
# This Dockerfile is useful for compiling the application once and quickly starting it up
# It is not useful yet for live development
FROM cirrusci/flutter
EXPOSE 5050
RUN apt update
# Add tini for proper signal propagation (CTRL-C)
# Add python for http server, the built-in `run -d web-server` rebuilds every time
RUN apt install -y tini python3
RUN flutter precache --web
COPY lib /idea2art/lib
COPY web /idea2art/web
COPY assets /idea2art/assets
COPY pubspec* /idea2art/
WORKDIR /idea2art
RUN flutter build web --release
# use `tini -g` to propagate SIGINT to child process so that CTRL-C works
ENTRYPOINT ["tini", "-g", "--"]
WORKDIR /idea2art/build/web/
# FIXME: this would allow us to avoid python but sadly it runs the compilation again (despite --no-build)
# CMD flutter run -d web-server \
# --release \
# --web-hostname 0.0.0.0 \
# --web-port 5050 \
# --no-devtools \
# --no-build \
# --no-hot
CMD python3 -m http.server 5050