fix(identity-service): 移除所有中国镜像配置,使用官方源+代理
- 移除 Alpine 镜像加速 - 移除 Debian 镜像加速 - 移除 npm 镜像加速 - 通过 Docker 代理访问官方源 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
d18de9823f
commit
e4172c11b9
|
|
@ -5,12 +5,6 @@
|
|||
# Build stage - use Alpine for smaller build context
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
# Use Aliyun mirror for Alpine packages (China acceleration)
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
|
||||
# Use taobao npm registry (China acceleration)
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
|
|
@ -41,19 +35,12 @@ FROM node:20-slim
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
# Use Aliyun mirror for Debian packages (China acceleration)
|
||||
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources 2>/dev/null || \
|
||||
sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list 2>/dev/null || true
|
||||
|
||||
# Install OpenSSL and curl for health checks
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
openssl \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Use taobao npm registry (China acceleration)
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
|
||||
# Install production dependencies only
|
||||
COPY package*.json ./
|
||||
RUN npm ci --only=production
|
||||
|
|
|
|||
Loading…
Reference in New Issue