diff --git a/backend/Dockerfile b/backend/Dockerfile index 8bbd306..63814f4 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,5 +1,5 @@ # 使用国内镜像加速 -FROM python:3.9-slim +FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.9-slim # 设置工作目录 WORKDIR /app diff --git a/docker-compose.yml b/docker-compose.yml index 84e3d47..4b2492a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.8' services: # MySQL 数据库 mysql: - image: mysql:8.0 + image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/mysql:8.0 container_name: nex-docus-mysql restart: unless-stopped environment: @@ -29,7 +29,7 @@ services: # Redis 缓存 redis: - image: redis:7-alpine + image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/redis:7-alpine container_name: nex-docus-redis restart: unless-stopped command: redis-server --requirepass ${REDIS_PASSWORD:-redis_password_change_me} --appendonly yes diff --git a/forntend/Dockerfile b/forntend/Dockerfile index 1fa91cc..24ff563 100644 --- a/forntend/Dockerfile +++ b/forntend/Dockerfile @@ -1,5 +1,5 @@ # 构建阶段 -FROM node:18-alpine AS builder +FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/node:18-alpine AS builder # 设置工作目录 WORKDIR /app @@ -20,7 +20,7 @@ COPY . . RUN npm run build # 生产阶段 -FROM nginx:alpine +FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/nginx:alpine # 复制构建产物到 nginx COPY --from=builder /app/dist /usr/share/nginx/html