Failed to fetch google fonts while docker build, updated Docker image to lts-alpine3.23#626
Failed to fetch google fonts while docker build, updated Docker image to lts-alpine3.23#626harmeetsingh-work wants to merge 1 commit intosrbhr:mainfrom
Conversation
Updated node docker image to lts-alpine3.23, as facing google font fetching error while building with image lts-alpine3.23
Code Review SummaryStatus: 1 Issue Found | Recommendation: Consider addressing before merge Overview
Issue Details (click to expand)WARNING
Details: The change from Recommendation: Consider using a pinned version like Additional NotesThe Google Fonts fetch error in the PR description is typically a network/DNS issue during Docker build, not necessarily related to the base image. The Alpine image may work due to different network configuration (musl libc vs glibc, different DNS resolver). If the issue recurs, consider:
Files Reviewed (1 file)
|
| # Stage 1: Build Frontend | ||
| # ============================================ | ||
| FROM node:22-slim AS frontend-builder | ||
| FROM node:lts-alpine3.23 AS frontend-builder |
There was a problem hiding this comment.
WARNING: Using floating lts tag may cause non-reproducible builds
The lts tag is a floating tag that changes when a new Node.js version becomes LTS. When Node.js 24 becomes LTS, this image will automatically change, potentially breaking builds.
| FROM node:lts-alpine3.23 AS frontend-builder | |
| FROM node:22-alpine3.23 AS frontend-builder |
This pins to Node 22 while still using the Alpine base that resolved the Google Fonts issue.
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="Dockerfile">
<violation number="1" location="Dockerfile:7">
P2: Builder uses floating `node:lts` tag while runtime is pinned to Node 22, risking build/runtime mismatch and non-reproducible builds when LTS advances.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| # Stage 1: Build Frontend | ||
| # ============================================ | ||
| FROM node:22-slim AS frontend-builder | ||
| FROM node:lts-alpine3.23 AS frontend-builder |
There was a problem hiding this comment.
P2: Builder uses floating node:lts tag while runtime is pinned to Node 22, risking build/runtime mismatch and non-reproducible builds when LTS advances.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Dockerfile, line 7:
<comment>Builder uses floating `node:lts` tag while runtime is pinned to Node 22, risking build/runtime mismatch and non-reproducible builds when LTS advances.</comment>
<file context>
@@ -4,7 +4,7 @@
# Stage 1: Build Frontend
# ============================================
-FROM node:22-slim AS frontend-builder
+FROM node:lts-alpine3.23 AS frontend-builder
WORKDIR /app/frontend
</file context>
| FROM node:lts-alpine3.23 AS frontend-builder | |
| FROM node:22-alpine3.23 AS frontend-builder |
Description
While docker build getting error:
copilot:summary
Type
Proposed Changes
Updated node docker image to node:lts-alpine3.23 from node:22-slim in Dockerfile
How to Test
Checklist
Additional Information
copilot:walkthrough
Summary by cubic
Switched the frontend builder base image from node:22-slim to node:lts-alpine3.23. This fixes Next.js build failures in Docker caused by Google Fonts fetch errors and restores a successful production build.
Written for commit 4e72909. Summary will update on new commits.