move non-root id run for CDT container
[appc/deployment.git] / cdt / src / main / docker / Dockerfile
index dc2d1ed..4fe3d4f 100644 (file)
 FROM httpd:2.4-alpine
 MAINTAINER APP-C Team (appc@lists.openecomp.org)
 
-COPY config-design-tool /usr/local/apache2/htdocs/
+RUN sed -i -e "s/80/18080/" /usr/local/apache2/conf/httpd.conf; \
+addgroup -S cdt && adduser -S cdt -G cdt
 
-COPY startCdt.sh /opt/startCdt.sh
+COPY --chown=cdt:cdt config-design-tool /usr/local/apache2/htdocs/
+
+COPY --chown=cdt:cdt startCdt.sh /opt/startCdt.sh
+
+RUN chown -R cdt:cdt /opt; \
+chown -R cdt:cdt /usr/local/apache2
+
+USER cdt:cdt