web-faq/docker/Dockerfile
Suchin Sapphasitthatha c8f1a416d3 fix dockerfile
2024-12-16 19:37:52 +07:00

20 lines
479 B
Docker

# docker build . -t docker.frappet.com/demo/fe:latest
FROM node:20-alpine AS build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY ./ .
RUN npm run build
FROM nginx AS production-stage
RUN mkdir /app
COPY --from=build-stage /app/dist /app
COPY docker/nginx.conf /etc/nginx/nginx.conf
# COPY entrypoint.sh /usr/local/bin/entrypoint.sh
# RUN chmod u+x /usr/local/bin/entrypoint.sh
# ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]