Update aai-common-alpine base image in resources 92/136192/4
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Mon, 16 Oct 2023 07:59:14 +0000 (09:59 +0200)
committerFiete Ostkamp <fiete.ostkamp@telekom.de>
Fri, 19 Jan 2024 10:09:50 +0000 (10:09 +0000)
- update [aai-common-alpine](https://hub.docker.com/r/onap/aai-common-alpine/tags) base image from 1.6.0 to 1.9.6
- add README-instructions for building the docker image

Issue-ID: AAI-3662
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Change-Id: Ic0f1993520b95f435543e12ac7b332fb4f4d5f94

README.md
aai-resources/pom.xml
aai-resources/src/main/docker/Dockerfile

index 941a734..554c020 100644 (file)
--- a/README.md
+++ b/README.md
@@ -48,3 +48,10 @@ Integration tests are located in `it` directory, and disabled by default in the
 `<skipITs>true</skipITs>`
 
 As a naming convention, All integration test classes should end with `IT`, and will be executed by changing the `skipITs` value in pom file, or through the command line `-DskipITs=false`
+
+## Docker
+
+To build the docker image, the maven `docker` profile can be used:
+```sh
+JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 mvn clean install -P docker -DskipTests
+```
\ No newline at end of file
index 631e7e8..ecb1e61 100644 (file)
@@ -41,7 +41,7 @@
         <docker.push.registry>localhost:5000</docker.push.registry>
         <aai.docker.version>1.0.0</aai.docker.version>
         <aai.base.image>alpine</aai.base.image>
-        <aai.base.image.version>1.6.0</aai.base.image.version>
+        <aai.base.image.version>1.9.6</aai.base.image.version>
 
         <netty.handler.version>4.1.63.Final</netty.handler.version>
         <netty.version>4.1.63.Final</netty.version>
index be115e7..f8b9820 100644 (file)
@@ -1,6 +1,8 @@
 FROM @aai.docker.namespace@/aai-common-@aai.base.image@:@aai.base.image.version@
 
+USER root
 RUN  mkdir -p /opt/aaihome/aaiadmin /opt/aai/logroot/AAI-RES /opt/bulkprocess_load
+RUN chown -R aaiadmin:aaiadmin /opt/aaihome /opt/aai/logroot/AAI-RES /opt/bulkprocess_load
 
 
 VOLUME /tmp
@@ -15,10 +17,6 @@ ENV AAI_BUILD_VERSION @aai.docker.version@
 # 8447 is the important one to be used
 EXPOSE 8447
 
-RUN groupadd aaiadmin -g 1000
-
-RUN adduser -u 1000 -h /opt/aaihome/aaiadmin -S -D -G aaiadmin -s /bin/bash aaiadmin
-
 # Add the proper files into the docker image from your build
 WORKDIR /opt/app/aai-resources