Commit f39e8188 by zhangxingmin

push

parent 321665c7
# 使用 Nginx 基础镜像
FROM nginx:1.25-alpine
# 安装 Node.js 和基本依赖
# 设置时区
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 使用阿里云镜像源替换 Alpine 官方源
RUN echo "https://mirrors.aliyun.com/alpine/v3.19/main" > /etc/apk/repositories && \
echo "https://mirrors.aliyun.com/alpine/v3.19/community" >> /etc/apk/repositories
# 安装 Node.js 和基本依赖(使用阿里云源加速)
RUN apk add --no-cache \
nodejs \
npm \
curl \
bash
# 设置时区
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 设置工作目录
WORKDIR /app
# 复制项目文件
COPY . .
# 配置 npm 镜像源 (简化版)
# 配置 npm 镜像源为淘宝源
RUN npm config set registry https://registry.npmmirror.com
# 复制自定义 Nginx 配置
......@@ -26,5 +30,3 @@ COPY nginx.conf /etc/nginx/conf.d/app.conf
# 暴露端口
EXPOSE 8333
# 注意:这里不设置默认 CMD,将在运行时指定
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment