mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
chore: use mirror/proxy to speed up docker image building
This commit is contained in:
@@ -8,7 +8,7 @@ WORKDIR /app/web/admin-spa
|
||||
COPY web/admin-spa/package*.json ./
|
||||
|
||||
# 🔽 安装前端依赖
|
||||
RUN npm ci
|
||||
RUN npm i --registry http://mirrors.tencent.com/npm/
|
||||
|
||||
# 📋 复制前端源代码
|
||||
COPY web/admin-spa/ ./
|
||||
@@ -25,7 +25,7 @@ LABEL description="Claude Code API Relay Service"
|
||||
LABEL version="1.0.0"
|
||||
|
||||
# 🔧 安装系统依赖
|
||||
RUN apk add --no-cache \
|
||||
RUN HTTPS_PROXY=http://114.113.120.5:3128 apk add --no-cache \
|
||||
curl \
|
||||
dumb-init \
|
||||
sed \
|
||||
@@ -38,7 +38,7 @@ WORKDIR /app
|
||||
COPY package*.json ./
|
||||
|
||||
# 🔽 安装依赖 (生产环境)
|
||||
RUN npm ci --only=production && \
|
||||
RUN npm i --only=production --registry http://mirrors.tencent.com/npm/ && \
|
||||
npm cache clean --force
|
||||
|
||||
# 📋 复制应用代码
|
||||
@@ -68,4 +68,4 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||
|
||||
# 🚀 启动应用
|
||||
ENTRYPOINT ["dumb-init", "--", "/usr/local/bin/docker-entrypoint.sh"]
|
||||
CMD ["node", "src/app.js"]
|
||||
CMD ["node", "src/app.js"]
|
||||
|
||||
Reference in New Issue
Block a user