Merge "Added William Reehil as committer"
authorJames Forsyth <jf2512@att.com>
Tue, 16 Jun 2020 13:13:11 +0000 (13:13 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 16 Jun 2020 13:13:11 +0000 (13:13 +0000)
src/main/docker/Dockerfile

index a523778..a4da9af 100644 (file)
@@ -3,9 +3,18 @@ FROM @aai.docker.namespace@/aai-common-@aai.base.image@:@aai.base.image.version@
 ARG MICRO_HOME=/opt/app/model-loader
 
 # Build up the deployment folder structure
-RUN mkdir -p $MICRO_HOME
+RUN mkdir -p $MICRO_HOME $MICRO_HOME/logs
+
+RUN groupadd aaiadmin -g 1000
+RUN adduser -u 1000 -h /opt/aaihome/aaiadmin -S -D -G aaiadmin -s /bin/bash aaiadmin
 WORKDIR $MICRO_HOME
-COPY /maven/model-loader/ .
+
+RUN chown -R aaiadmin:aaiadmin $MICRO_HOME $MICRO_HOME/logs
+
+COPY --chown=aaiadmin:aaiadmin /maven/model-loader/ .
+
+USER aaiadmin
+
 RUN chmod 755 bin/* \
     && ln -s /logs $MICRO_HOME/logs