JanetFrontEnd/Dockerfile

25 lines
367 B
Docker

FROM node:16-alpine as build
WORKDIR /app
COPY package.json .
COPY package-lock.json .
RUN npm install react-router-dom
RUN npm install
COPY ./src ./src
COPY ./public ./public
RUN npm run build
COPY . .
#CMD ["npm", "start"]
FROM nginx:stable-alpine
COPY --from=build /app/build /usr/share/nginx/html
COPY nginx.default.conf /etc/nginx/conf.d/default.conf