blob: b2eddc8c8d4692a0928e130fae990845198dff94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
FROM node:6.10.3
ENV INSROOT /opt/app
ENV APPUSER dh
ENV APPDIR ${INSROOT}/${APPUSER}
RUN mkdir -p ${APPDIR}/lib \
&& mkdir -p ${APPDIR}/etc \
&& mkdir -p ${APPDIR}/log \
&& useradd -d ${APPDIR} ${APPUSER}
COPY *.js ${APPDIR}/
COPY *.json ${APPDIR}/
COPY *.txt ${APPDIR}/
COPY *.yaml ${APPDIR}/
COPY ./lib/ ${APPDIR}/lib/
COPY ./etc/ ${APPDIR}/etc/
WORKDIR ${APPDIR}
RUN npm install --only=production \
&& chown -R ${APPUSER}:${APPUSER} ${APPDIR} \
&& npm remove -g npm \
&& ls -laR -Inode_modules
USER ${APPUSER}
VOLUME ${APPDIR}/log
EXPOSE 8443
ENTRYPOINT ["/usr/local/bin/node", "deployment-handler.js"]
|