Files
YG-Datasets/frontend/Dockerfile

23 lines
323 B
Docker
Raw Normal View History

2026-03-17 14:36:31 +08:00
FROM node:20-alpine
WORKDIR /app
# Install dependencies
COPY package.json .
RUN npm install
# Copy source
COPY . .
# Build
RUN npm run build
# Serve with nginx
FROM nginx:alpine
COPY --from=0 /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]