mirror of
https://github.com/LinwoodDev/Butterfly.git
synced 2026-03-13 09:20:32 +08:00
30 lines
799 B
Docker
30 lines
799 B
Docker
# Install Operating system and dependencies
|
|
FROM ubuntu:20.04
|
|
|
|
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
|
|
|
|
# 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 mkdir /app/
|
|
RUN flutter build web
|
|
FROM python:3
|
|
|
|
# Copy build/web in container to /app/
|
|
COPY ./build/web /app/
|
|
WORKDIR /app/
|
|
|
|
# Record the exposed port
|
|
EXPOSE 5000
|
|
|
|
CMD python -m http.server 5000 |