Switched to a dedicated flutter base image
This commit is contained in:
+4
-20
@@ -1,22 +1,6 @@
|
|||||||
#Stage 1 - Install dependencies and build the app
|
# Stage 1 - Install dependencies and build the app
|
||||||
FROM debian:latest AS build-env
|
# This matches the flutter version on our CI/CD pipeline on Github
|
||||||
|
FROM cirrusci/flutter:3.7.5 AS build-env
|
||||||
ENV FLUTTER_CHANNEL="stable"
|
|
||||||
ENV FLUTTER_VERSION="3.7.5"
|
|
||||||
ENV FLUTTER_URL="https://storage.googleapis.com/flutter_infra_release/releases/$FLUTTER_CHANNEL/linux/flutter_linux_$FLUTTER_VERSION-$FLUTTER_CHANNEL.tar.xz"
|
|
||||||
ENV FLUTTER_HOME="/opt/flutter"
|
|
||||||
|
|
||||||
ENV PATH "$PATH:$FLUTTER_HOME/bin"
|
|
||||||
|
|
||||||
# Prerequisites
|
|
||||||
RUN apt update && apt install -y curl git unzip xz-utils zip gzip libglu1-mesa \
|
|
||||||
&& mkdir -p $FLUTTER_HOME \
|
|
||||||
&& git config --global --add safe.directory /opt/flutter \
|
|
||||||
&& curl -o flutter.tar.xz $FLUTTER_URL \
|
|
||||||
&& tar xf flutter.tar.xz -C /opt \
|
|
||||||
&& rm flutter.tar.xz \
|
|
||||||
&& flutter doctor \
|
|
||||||
&& rm -rf /var/lib/{apt,dpkg,cache,log}
|
|
||||||
|
|
||||||
# Set directory to Copy App
|
# Set directory to Copy App
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -36,4 +20,4 @@ COPY --from=build-env /app/build/web /usr/share/nginx/html
|
|||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
# Before stating NGinx, re-zip all the content to ensure customizations are propagated
|
# Before stating NGinx, re-zip all the content to ensure customizations are propagated
|
||||||
CMD gzip -k -r /usr/share/nginx/html/ && nginx -g 'daemon off;'
|
CMD gzip -k -r -f /usr/share/nginx/html/ && nginx -g 'daemon off;'
|
||||||
|
|||||||
Reference in New Issue
Block a user