17 lines
288 B
Docker
17 lines
288 B
Docker
# Production image for React app
|
|
FROM node:18-alpine AS builder
|
|
|
|
WORKDIR /home/node
|
|
|
|
VOLUME /home/node/node_modules
|
|
|
|
COPY . .
|
|
|
|
RUN npm i -g npm@latest \
|
|
&& npm ci --legacy-peer-deps \
|
|
&& npm run build
|
|
|
|
|
|
FROM nginx:alpine
|
|
COPY --from=builder /home/node/build /usr/share/nginx/html
|