Skip to content

Instantly share code, notes, and snippets.

@Ahmadre
Created February 7, 2021 00:22
Show Gist options
  • Save Ahmadre/0f00e5483217a62c4f1ee259ca8da419 to your computer and use it in GitHub Desktop.
Save Ahmadre/0f00e5483217a62c4f1ee259ca8da419 to your computer and use it in GitHub Desktop.
Dockerize Flutter
# 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