mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-04 12:36:37 +08:00
chore: allow docker build registry proxies
This commit is contained in:
+4
-1
@@ -16,9 +16,10 @@
|
|||||||
|
|
||||||
# ---- Stage 1: frontend (always build on the host architecture) -------------
|
# ---- Stage 1: frontend (always build on the host architecture) -------------
|
||||||
FROM --platform=$BUILDPLATFORM node:20-alpine AS frontend
|
FROM --platform=$BUILDPLATFORM node:20-alpine AS frontend
|
||||||
|
ARG NPM_CONFIG_REGISTRY=https://registry.npmjs.org/
|
||||||
WORKDIR /app/web
|
WORKDIR /app/web
|
||||||
COPY web/package*.json ./
|
COPY web/package*.json ./
|
||||||
RUN npm ci
|
RUN npm ci --registry="${NPM_CONFIG_REGISTRY}"
|
||||||
COPY web/ .
|
COPY web/ .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
@@ -26,6 +27,8 @@ RUN npm run build
|
|||||||
FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS backend
|
FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS backend
|
||||||
ARG TARGETOS
|
ARG TARGETOS
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
|
ARG GOPROXY=https://proxy.golang.org,direct
|
||||||
|
ENV GOPROXY=${GOPROXY}
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|||||||
Reference in New Issue
Block a user