FROM node:18-alpine

# 配置Alpine国内镜像源（加速apk）
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories

WORKDIR /app

COPY package*.json ./

RUN npm install --registry=https://registry.npmmirror.com

COPY . .

EXPOSE 8080

CMD ["npm", "run", "dev"]
