log-viewer/backend/Dockerfile

22 lines
390 B
Docker
Raw Normal View History

2022-02-09 11:56:34 +00:00
# pull official node image
2022-10-11 13:24:15 +00:00
FROM node AS dev
2022-02-09 11:56:34 +00:00
# define /app as working directory
WORKDIR /app
# copy package.json and package-lock.json to /app
COPY package.json /app
COPY package-lock.json /app
# install node dependencies
RUN npm install
COPY . /app
# launch node server
2022-10-11 13:24:15 +00:00
ENTRYPOINT npm run dev
# production
FROM node AS prod
WORKDIR /app
COPY --from=dev /app ./
ENTRYPOINT npm run start