2022-10-21 11:17:05 +02:00
|
|
|
# pull official base image
|
2023-01-12 18:17:50 +01:00
|
|
|
FROM node:lts
|
2022-10-21 11:17:05 +02:00
|
|
|
|
|
|
|
# set working directory
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
# add `/app/node_modules/.bin` to $PATH
|
|
|
|
ENV PATH /app/node_modules/.bin:$PATH
|
|
|
|
|
|
|
|
# install app dependencies
|
|
|
|
COPY package.json ./
|
|
|
|
COPY package-lock.json ./
|
|
|
|
RUN npm install --silent
|
|
|
|
RUN npm install react-scripts@3.4.1 -g --silent
|
2022-10-21 15:13:19 +02:00
|
|
|
RUN npm install -g serve --save
|
|
|
|
RUN npm audit fix
|
2022-10-21 11:17:05 +02:00
|
|
|
|
|
|
|
# add app
|
2022-10-21 15:13:19 +02:00
|
|
|
COPY . /app/
|
2022-10-21 11:17:05 +02:00
|
|
|
|
|
|
|
# start app
|
|
|
|
CMD ["npm", "start"]
|