File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM node:10.15.3-alpine
1+ FROM node:10.15.3-alpine as builder
22USER root
33
44WORKDIR /opt/email-notifier
@@ -10,15 +10,23 @@ RUN apk add --no-cache -t build-dependencies make gcc g++ python libtool autocon
1010 && npm install -g node-gyp
1111
1212COPY package.json package-lock.json* /opt/email-notifier/
13- RUN npm install --production && \
14- npm uninstall -g npm
15-
16- RUN apk del build-dependencies
13+ RUN npm install
1714
1815COPY src /opt/email-notifier/src
1916COPY config /opt/email-notifier/config
2017COPY app.js /opt/email-notifier/
2118COPY templates /opt/email-notifier/templates
2219
20+ FROM node:10.15.3-alpine
21+
22+ WORKDIR /opt/email-notifier
23+
24+ COPY --from=builder /opt/email-notifier .
25+ RUN npm prune --production
26+
27+ # Create empty log file & link stdout to the application log file
28+ RUN mkdir ./logs && touch ./logs/combined.log
29+ RUN ln -sf /dev/stdout ./logs/combined.log
30+
2331EXPOSE 3081
2432CMD node app.js
You can’t perform that action at this time.
0 commit comments