gonito-frontend/Dockerfile

23 lines
423 B
Docker
Raw Permalink Normal View History

2022-10-21 11:17:05 +02:00
# pull official base image
FROM node:lts-bullseye
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"]