17 lines
482 B
Docker
17 lines
482 B
Docker
FROM node:22-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
|
COPY package.json /app/package.json
|
|
RUN npm config set registry https://registry.npmmirror.com && npm install
|
|
|
|
COPY . /app
|
|
RUN npm run build
|
|
|
|
FROM nginx:1.27-alpine
|
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
|
EXPOSE 80
|