diff options
author | Alex Shatov <alexs@att.com> | 2018-09-17 16:21:53 -0400 |
---|---|---|
committer | Alex Shatov <alexs@att.com> | 2018-09-17 16:21:53 -0400 |
commit | cb017456dbe09fc8f3e5270e641ab8f323ecde76 (patch) | |
tree | f62de1c4b25754700f0138785a9874db8170d83d /Dockerfile | |
parent | ceda84d021dde70299f96984ca7aec16740854be (diff) |
3.0.2 tls web-server under k8s3.0.2
- external version 3.0.2
- internal version 5.0.2 for code change - no API change
- https server is enabled when either of the following pairs
are found in fs:
1. etc/cert/cert and etc/cert/pass (old behavior)
2. etc/cert/cert.p12 and etc/cert/p12.pass - added alternative
- hide secrets when logging the config
- changed Dockerfile to copy the whole etc/ folder
that might contain etc/cert/* files - easier to test
- replaced CRLF with LF in swagger-ui.js - no code change
- unit tested
Coverage summary
Statements : 77.45% ( 910/1175 )
Branches : 53.7% ( 283/527 )
Functions : 79.9% ( 159/199 )
Lines : 77.85% ( 900/1156 )
Change-Id: I921e0d6ac9573f60fa98910f799f9d034b573542
Signed-off-by: Alex Shatov <alexs@att.com>
Issue-ID: DCAEGEN2-780
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 39 |
1 files changed, 25 insertions, 14 deletions
@@ -1,19 +1,30 @@ FROM node:6.10.3 -MAINTAINER maintainer -ENV INSROOT /opt/app + +ENV INSROOT /opt/app ENV APPUSER dh -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 *.json ${INSROOT}/${APPUSER}/ -COPY *.yaml ${INSROOT}/${APPUSER}/ -COPY lib ${INSROOT}/${APPUSER}/lib/ -COPY etc/log4js.json ${INSROOT}/${APPUSER}/etc/log4js.json -WORKDIR ${INSROOT}/${APPUSER} -RUN npm install --only=production && chown -R ${APPUSER}:${APPUSER} ${INSROOT}/${APPUSER} && npm remove -g npm +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 ${INSROOT}/${APPUSER}/log +VOLUME ${APPDIR}/log EXPOSE 8443 + ENTRYPOINT ["/usr/local/bin/node", "deployment-handler.js"] |