drawDB/Dockerfile

13 lines
346 B
Docker
Raw Normal View History

2024-04-07 23:26:48 +08:00
# Stage 1: Build the NextJS Application
FROM node:20-alpine as build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Stage 2: Setup the Nginx Server to serve the NextJS Application
FROM nginx:stable-alpine3.17 as production
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]