Created
February 7, 2021 00:22
-
-
Save Ahmadre/0f00e5483217a62c4f1ee259ca8da419 to your computer and use it in GitHub Desktop.
Dockerize Flutter
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
# Provide nginx webserver | |
FROM nginx:stable | |
# Set directory to Copy App | |
WORKDIR /app | |
# Prerequisites | |
RUN apt update && apt install -y curl git unzip xz-utils zip libglu1-mesa | |
# Download Flutter SDK | |
RUN git clone https://github.com/flutter/flutter.git | |
ENV PATH "$PATH:/app/flutter/bin" | |
# Run basic check to download Dark SDK | |
RUN flutter doctor | |
# Copy Flutter App into Image | |
COPY . . | |
# Copy nginx config | |
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf | |
RUN chmod +x /app/entrypoint.sh | |
# Open http port | |
EXPOSE 80 | |
# Set custom entrypoint | |
ENTRYPOINT ["/app/entrypoint.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment