diff options
Diffstat (limited to 'src/main/docker/Dockerfile')
-rw-r--r-- | src/main/docker/Dockerfile | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile index a4da9af..10bc3e6 100644 --- a/src/main/docker/Dockerfile +++ b/src/main/docker/Dockerfile @@ -2,20 +2,17 @@ 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 $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 -RUN chown -R aaiadmin:aaiadmin $MICRO_HOME $MICRO_HOME/logs +USER root -COPY --chown=aaiadmin:aaiadmin /maven/model-loader/ . +RUN mkdir -p /opt/aaihome $MICRO_HOME /logs && \ + ln -s /logs $MICRO_HOME/logs && \ + chown -R aaiadmin:aaiadmin $MICRO_HOME && \ + chown -R aaiadmin:aaiadmin /logs -USER aaiadmin +COPY --chown=aaiadmin:aaiadmin /maven/model-loader/ . -RUN chmod 755 bin/* \ - && ln -s /logs $MICRO_HOME/logs +ENTRYPOINT ["/bin/bash", "/opt/app/model-loader/bin/start.sh"] -CMD ["/opt/app/model-loader/bin/start.sh"] +USER aaiadmin |