2021-05-11 09:26:33 +10:00

25 lines
473 B
Docker

FROM node:12.4.0-alpine as dev
RUN mkdir /work/
WORKDIR /work/
COPY ./src/package.json /work/package.json
RUN npm install
RUN npm install -g nodemon
COPY ./src/ /work/src/
# ENTRYPOINT [ "nodemon", "--inspect=0.0.0.0:9229", "./src/server.js" ]
# ENTRYPOINT [ "/usr/bin/top" ]
CMD top
###########START NEW IMAGE###################
FROM node:12.4.0-alpine as prod
WORKDIR /work/
COPY ./src/package.json /work/package.json
RUN npm install
COPY ./src/ /work/
CMD node .