summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile9
-rw-r--r--pom.xml4
2 files changed, 7 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index 8824c3b..e740c00 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,16 +14,13 @@
# limitations under the License.
#
-FROM openjdk:8-jre-alpine
+FROM openjdk:11-jre-slim
ARG SERVER_PORT
ARG PKG_FILENAME=nbi-rest-services-4.0.1-SNAPSHOT.jar
ADD target/$PKG_FILENAME app.jar
-RUN addgroup -S appgroup
-RUN adduser -S appuser -G appgroup
-RUN mkdir temptoscafile
-RUN chown appuser:appgroup temptoscafile/
+RUN addgroup appgroup && useradd -ms /bin/bash appuser && adduser appuser appgroup && mkdir temptoscafile && chown appuser:appgroup temptoscafile/
COPY src/main/resources/certificate /certs
ARG CERT_PASS=changeit
@@ -43,4 +40,4 @@ ENV SERVER_PORT=${SERVER_PORT:-8080}
ENV JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom"
EXPOSE $SERVER_PORT
-ENTRYPOINT java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap $JAVA_OPTS -jar /app.jar
+ENTRYPOINT java -XX:+UseContainerSupport $JAVA_OPTS -jar /app.jar
diff --git a/pom.xml b/pom.xml
index 9a254a4..43fefff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -387,7 +387,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
+ <version>2.22.0</version>
<configuration>
+<!-- <argLine>-->
+<!-- &#45;&#45;illegal-access=permit-->
+<!-- </argLine>-->
<includes>
<include>org/onap/nbi/test/KarateApiTest.java</include>
<include>org/onap/nbi/test/ExecutionTaskTest.java</include>