TiBillet-Ticket-Nonfree/Docker/Dockerfile_Node/dockerfile

18 lines
393 B
Plaintext

# develop stage
FROM node:lts-bullseye as develop-stage
RUN apt update && apt upgrade -y
RUN apt install python -y
COPY package*.json ./
RUN yarn install
COPY . .
# build stage
FROM develop-stage as build-stage
RUN yarn build
# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]