FROM leoafarias/fvm:latest as build # This is needed, because for some reason it doesn't work with the default user because of permissions USER root WORKDIR /app COPY .fvm/fvm_config.json .fvm/ RUN fvm install RUN fvm flutter config --enable-web RUN fvm flutter precache # TODO: Efficiently cache dependencies COPY . . RUN cd packages/app && fvm flutter build web --no-web-resources-cdn FROM nginx:alpine COPY packages/app/nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build /app/packages/app/build/web/ /usr/share/nginx/html