-
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
ad6aa84
commit 458b586
Showing
17 changed files
with
1,013 additions
and
1,146 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,32 @@ | ||
# Install Operating system and dependencies | ||
FROM ubuntu:24.04 AS builder | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y curl git wget unzip gdb libstdc++6 libglu1-mesa fonts-droid-fallback python3 yq | ||
RUN apt-get clean | ||
|
||
RUN mkdir /flutter_app/ | ||
COPY . /flutter_app | ||
WORKDIR /flutter_app/app | ||
|
||
# download Flutter SDK from Flutter Github repo | ||
RUN git clone https://github.com/flutter/flutter.git -b $(yq '.environment.flutter' /flutter_app/app/pubspec.yaml -r) /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 | ||
|
||
# Nginx Container | ||
FROM nginx:alpine | ||
|
||
EXPOSE 80 | ||
|
||
# Copy build/web in container to /app/ | ||
COPY --from=builder /flutter_app/app/build/web /usr/share/nginx/html |
Oops, something went wrong.