23 lines
377 B
Docker
23 lines
377 B
Docker
# pull the base image
|
|
FROM node:alpine
|
|
|
|
# set the working direction
|
|
#WORKDIR /app
|
|
WORKDIR /usr/src/app
|
|
|
|
# add `/app/node_modules/.bin` to $PATH
|
|
# ENV PATH /app/node_modules/.bin:$PATH
|
|
ENV PATH /usr/src/app/node_modules/.bin:$PATH
|
|
|
|
# install app dependencies
|
|
COPY package.json ./
|
|
|
|
COPY package-lock.json ./
|
|
|
|
RUN npm install
|
|
|
|
# add app
|
|
COPY . ./
|
|
|
|
# start app
|
|
CMD ["npm", "start"] |