21 lines
328 B
Docker
21 lines
328 B
Docker
FROM node:slim AS build
|
|
|
|
# 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 && npm cache clean --force
|
|
|
|
EXPOSE 3000
|
|
|
|
# add app
|
|
COPY . ./
|
|
|
|
# start app
|
|
CMD ["npm", "start"]
|