-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
023ef0c
commit f84921c
Showing
5 changed files
with
85 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Install Operating system and dependencies | ||
FROM ubuntu:22.04 AS builder | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback lib32stdc++6 python3 | ||
RUN apt-get clean | ||
|
||
RUN mkdir /app/ | ||
COPY . /app | ||
WORKDIR /app | ||
# download Flutter SDK from Flutter Github repo | ||
RUN git clone https://github.com/flutter/flutter.git -b $(cat /FLUTTER_VERSION) /usr/local/flutter | ||
|
||
# Set flutter environment path | ||
ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}" | ||
# Run flutter doctor | ||
RUN flutter doctor | ||
|
||
RUN flutter config --enable-web | ||
|
||
# Copy files to container and build | ||
RUN flutter build web | ||
|
||
FROM python:3 | ||
|
||
RUN mkdir /app/ | ||
# Copy build/web in container to /app/ | ||
COPY --from=builder ./build/web /app/ | ||
WORKDIR /app/ | ||
|
||
# Record the exposed port | ||
EXPOSE 5000 | ||
|
||
CMD python -m http.server 5000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters