summaryrefslogtreecommitdiffstats
path: root/sparkybe-onap-application/src/main/docker/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'sparkybe-onap-application/src/main/docker/Dockerfile')
-rw-r--r--sparkybe-onap-application/src/main/docker/Dockerfile25
1 files changed, 12 insertions, 13 deletions
diff --git a/sparkybe-onap-application/src/main/docker/Dockerfile b/sparkybe-onap-application/src/main/docker/Dockerfile
index 117c54c..035abd2 100644
--- a/sparkybe-onap-application/src/main/docker/Dockerfile
+++ b/sparkybe-onap-application/src/main/docker/Dockerfile
@@ -2,9 +2,10 @@ FROM @aai.docker.namespace@/aai-common-@aai.base.image@:@aai.base.image.version@
ARG MICRO_HOME=/opt/app/sparky
ARG BIN_HOME=$MICRO_HOME/bin
+ARG UI_LOGS=/var/log/onap/AAI-UI
# Build up the deployment folder structure
-RUN mkdir -p $MICRO_HOME
+RUN mkdir -p $MICRO_HOME $MICRO_HOME/logs $UI_LOGS
# Changes related to:AAI-2180
# Additional optional steps for Ubuntu
@@ -22,20 +23,18 @@ RUN if ((uname -v | grep -i "ubuntu") || ( cat /etc/*release|grep -i "ubuntu")
JAVA_HOME=usr/lib/jvm/java-8-openjdk-amd64; \
export JAVA_HOME ; \
fi; \
- ##########################################
- #Install gosu if not present
- ##########################################
- if type gosu 2>/dev/null; then \
- echo "skipping gosu installation"; \
- else \
- set -x ; \
- add-apt-repository -y ppa:tianon/gosu; \
- sudo apt-get update; \
- sudo apt-get install gosu; \
- fi;\
fi
+
+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/sparkybe-onap-application/ .
+RUN chown -R aaiadmin:aaiadmin $MICRO_HOME $MICRO_HOME/logs $UI_LOGS
+
+COPY --chown=aaiadmin:aaiadmin /maven/sparkybe-onap-application/ .
+
+USER aaiadmin
+
RUN chmod 755 $BIN_HOME/* \
&& ln -snf /logs $MICRO_HOME/logs