2021-02-08 15:04:13 +11:00
|
|
|
FROM node:12.4.0-alpine as dev
|
2021-02-08 13:43:09 +11:00
|
|
|
|
2021-02-08 15:04:13 +11:00
|
|
|
RUN mkdir /work/
|
|
|
|
WORKDIR /work/
|
|
|
|
|
|
|
|
COPY ./src/package.json /work/package.json
|
|
|
|
RUN npm install
|
2021-02-08 21:15:43 +11:00
|
|
|
RUN npm install -g nodemon
|
2021-02-08 15:04:13 +11:00
|
|
|
|
2021-02-08 21:15:43 +11:00
|
|
|
COPY ./src/ /work/src/
|
2021-02-08 13:43:09 +11:00
|
|
|
|
2021-05-11 09:26:33 +10:00
|
|
|
# ENTRYPOINT [ "nodemon", "--inspect=0.0.0.0:9229", "./src/server.js" ]
|
|
|
|
# ENTRYPOINT [ "/usr/bin/top" ]
|
|
|
|
CMD top
|
2021-02-08 13:43:09 +11:00
|
|
|
|
|
|
|
###########START NEW IMAGE###################
|
|
|
|
|
2021-02-08 21:15:43 +11:00
|
|
|
FROM node:12.4.0-alpine as prod
|
|
|
|
|
|
|
|
WORKDIR /work/
|
|
|
|
COPY ./src/package.json /work/package.json
|
|
|
|
RUN npm install
|
|
|
|
COPY ./src/ /work/
|
2021-02-08 15:04:13 +11:00
|
|
|
|
2021-02-08 21:15:43 +11:00
|
|
|
CMD node .
|