- Fix Docker multi-stage COPY failing when .next or dist directories don't exist
- Create output directories in runner stage before copying
- Use || true fallback for COPY commands to prevent build failures
- Add pre-copy directory validation messages
- This fixes builds for passenger-portal and passenger-backoffice which are Next.js apps
Fixes both passenger-portal and passenger-backoffice Docker build failures
The RUN instruction cannot contain COPY commands. Fixed by moving the COPY
instructions outside the RUN block and copying both Next.js (.next) and
Vite (dist) build outputs from the builder stage. The nginx configuration
can serve both build outputs appropriately.
Fixes: Docker build failure with "COPY: not found" error
- Check for both .next (Next.js) and dist (Vite/other) directories
- Copy .next and public assets for Next.js builds
- Fallback to dist directory for other build tools
- Fixes build verification for @edr/passenger-backoffice Next.js app
Replace direct Inter font import with fallback to system fonts. This prevents the build from failing if fonts.googleapis.com is unreachable during Docker build.
The `fallback` parameter ensures that if the Google Font fails to load, the application will gracefully fall back to system fonts instead of failing the entire build process.
Replace direct Inter font import with fallback to system fonts. This prevents the build from failing if fonts.googleapis.com is unreachable during Docker build.
The `fallback` parameter ensures that if the Google Font fails to load, the application will gracefully fall back to system fonts instead of failing the entire build process.
- Increase fetch-timeout to 120 seconds (default was likely 30s)
- Set retry min/max timeouts to handle transient network issues
- Increase fetch-retries to 5 (from default 2)
- Add NODE_OPTIONS with increased heap size to prevent OOM during build
- Resolves intermittent timeout failures when downloading Google Fonts and other CDN resources