ARG UBUNTU_IMAGE ARG CADDY_IMAGE FROM ${UBUNTU_IMAGE} AS build RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl git unzip xz-utils libglu1-mesa && rm -rf /var/lib/apt/lists/* ARG FLUTTER_VERSION ARG FLUTTER_COMMIT RUN git clone --depth 1 --branch "${FLUTTER_VERSION}" https://github.com/flutter/flutter.git /opt/flutter && test "$(git -C /opt/flutter rev-parse HEAD)" = "${FLUTTER_COMMIT}" ENV PATH="/opt/flutter/bin:${PATH}" RUN flutter config --no-analytics && flutter precache --web WORKDIR /src COPY frontend ./frontend WORKDIR /src/frontend/app ARG FRONTEND_URL=https://localhost:5126 RUN flutter pub get && flutter gen-l10n && flutter build web --no-wasm-dry-run --dart-define=SXCHNGE_API_URL=${FRONTEND_URL}/api/v1 --dart-define=SXCHNGE_CLIENT_ID=sxchnge-local-web FROM ${CADDY_IMAGE} COPY infra/local/frontend/Caddyfile /etc/caddy/Caddyfile COPY --from=build /src/frontend/app/build/web /srv