smarti/Dockerfile
2023-07-03 21:54:01 +00:00

12 lines
375 B
Docker

# specify the node base image with your desired version node:<version>
FROM node:16 as build
WORKDIR /app
copy ./ /app
RUN npm install --verbose
RUN npm run build --verbose
FROM nginx:alpine
COPY --from=build /app/build/ /usr/share/nginx/html
RUN chmod 755 /usr/share/nginx/html/ -rf
EXPOSE 80
ENTRYPOINT ["sh", "-c", "cd /usr/share/nginx/html/ && nginx -g 'daemon off;'"]