-
-
Save randomk/c9cc17ffc716b55ac4c6f4e4997ad875 to your computer and use it in GitHub Desktop.
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
#Stage 1 - Install dependencies and build the app | |
FROM arm64v8/ubuntu:20.04 AS build-env | |
# Install flutter dependencies | |
RUN apt-get update && \ | |
apt-get install -y bash curl file git unzip xz-utils zip libglu1-mesa && \ | |
git clone https://github.com/flutter/flutter.git -b master | |
ENV PATH="$PATH:/flutter/bin" | |
RUN flutter config --enable-web | |
# Copy files to container and build | |
RUN mkdir /app/ | |
COPY . /app/ | |
WORKDIR /app/ | |
RUN flutter build web --dart-define MS_MESSENGER_BASE_URL="https://sample-url/v1" --web-renderer html --release | |
# Stage 2 - Create the run-time image | |
FROM nginx:1.21.1-alpine | |
COPY --from=build-env /app/build/web /usr/share/nginx/htm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment