From 90162bb14fd85be148cb4fb7544bbdefb4601ab5 Mon Sep 17 00:00:00 2001 From: Jan Novak Date: Sun, 15 Mar 2026 15:07:57 +0100 Subject: [PATCH] Use mirror.gcr.io for Docker base images to avoid Docker Hub rate limits Co-Authored-By: Claude Opus 4.6 --- Dockerfile | 6 +++--- docs/DOCUMENTATION.md | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 22e8650..5093281 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # ---- Stage 1: Build frontend ---- -FROM node:22-alpine AS frontend-build +FROM mirror.gcr.io/library/node:22-alpine AS frontend-build WORKDIR /app/frontend COPY frontend/package.json frontend/package-lock.json ./ RUN npm ci @@ -7,7 +7,7 @@ COPY frontend/ ./ RUN npx vite build # ---- Stage 2: Build Go backend ---- -FROM golang:1.26-alpine AS backend-build +FROM mirror.gcr.io/library/golang:1.26-alpine AS backend-build WORKDIR /app/backend COPY backend/go.mod backend/go.sum ./ RUN go mod download @@ -15,7 +15,7 @@ COPY backend/ ./ RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /server ./cmd/server # ---- Stage 3: Runtime ---- -FROM alpine:3.21 +FROM mirror.gcr.io/library/alpine:3.21 RUN apk add --no-cache ca-certificates tzdata WORKDIR /app diff --git a/docs/DOCUMENTATION.md b/docs/DOCUMENTATION.md index 8cae2fb..085391c 100644 --- a/docs/DOCUMENTATION.md +++ b/docs/DOCUMENTATION.md @@ -776,6 +776,8 @@ This allows hot-reload development while the Go backend handles API and WebSocke The Dockerfile uses three stages for a minimal production image: +All base images are pulled from `mirror.gcr.io` (Google's public Docker Hub mirror) to avoid Docker Hub rate limits. + **Stage 1 -- Frontend build** (Node 22 Alpine): - Installs npm dependencies (`npm ci`) - Builds React app with Vite (`npx vite build`)