2021-09-01 00:20:53 +00:00
|
|
|
FROM node:slim AS build
|
2021-08-28 21:42:33 +00: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 ./
|
|
|
|
|
2021-09-01 00:20:53 +00:00
|
|
|
RUN npm install && npm cache clean --force
|
|
|
|
|
|
|
|
EXPOSE 3000
|
2021-08-28 21:42:33 +00:00
|
|
|
|
|
|
|
# add app
|
|
|
|
COPY . ./
|
|
|
|
|
|
|
|
# start app
|
|
|
|
CMD ["npm", "start"]
|