12 lines
374 B
Docker
12 lines
374 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/ -R
|
|
EXPOSE 80
|
|
ENTRYPOINT ["sh", "-c", "cd /usr/share/nginx/html/ && nginx -g 'daemon off;'"] |