aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorlj1412 <lji@research.att.com>2017-02-14 15:10:25 +0000
committerlj1412 <lji@research.att.com>2017-02-14 15:10:27 +0000
commitf2ec39706a7a31017f5d219c44d54d40714d9a27 (patch)
tree0442ccf8420a388d264cca3bc4965a0c1035af0d /Dockerfile
parentd53e0cf57fc289259b6c9de5bfad224f23cd2988 (diff)
Init dcae.orch-dispatcher
Change-Id: I52aa696bd5d1d5ed3bc6e03a3c994dc0b3a71062 Signed-off-by: lj1412 <lji@research.att.com>
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile18
1 files changed, 18 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..68811e3
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,18 @@
+FROM node:4.6.0
+MAINTAINER maintainer
+ENV INSROOT /opt/app
+ENV APPUSER dispatcher
+RUN mkdir -p ${INSROOT}/${APPUSER}/lib \
+ && mkdir -p ${INSROOT}/${APPUSER}/etc \
+ && mkdir -p ${INSROOT}/${APPUSER}/log \
+ && useradd -d ${INSROOT}/${APPUSER} ${APPUSER}
+COPY *.js ${INSROOT}/${APPUSER}/
+COPY package.json ${INSROOT}/${APPUSER}/
+COPY lib ${INSROOT}/${APPUSER}/lib/
+COPY etc/config.json.development ${INSROOT}/${APPUSER}/etc/config.json
+COPY etc/log4js.json ${INSROOT}/${APPUSER}/etc/log4js.json
+WORKDIR ${INSROOT}/${APPUSER}
+RUN npm install --production && chown -R ${APPUSER}:${APPUSER} ${INSROOT}/${APPUSER} && npm remove -g npm
+USER ${APPUSER}
+VOLUME ${INSROOT}/${APPUSER}/log
+ENTRYPOINT ["/usr/local/bin/node", "dispatcher.js"]