mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-29 22:56:41 +08:00
18 lines
352 B
Docker
18 lines
352 B
Docker
# 安装Node.js
|
|
FROM node:20-alpine3.17 as build
|
|
|
|
WORKDIR /app
|
|
COPY .. /app
|
|
|
|
RUN npm install -g pnpm \
|
|
&& pnpm install \
|
|
&& pnpm run build
|
|
|
|
FROM nginx:stable-alpine
|
|
COPY --from=build /app/dist /usr/share/nginx/html/
|
|
# COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY nginx.conf /etc/nginx/conf.d/
|
|
EXPOSE 80
|
|
CMD ["nginx","-g","daemon off;"]
|
|
|