summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authormrichomme <morgan.richomme@orange.com>2020-01-20 18:23:08 +0100
committermrichomme <morgan.richomme@orange.com>2020-01-27 09:00:56 +0100
commitb095cb9cc362e557611b2e1a92c96df0c76989ad (patch)
tree6ad41f7b6ba8b3b9448e722cd00021b12e4257e4 /Dockerfile
parent1116e46f92201756198079f242dc41375060dc2b (diff)
Add Dockerfile to build onap-java docker based on jdk11
Issue-ID: INT-1393 Signed-off-by: mrichomme <morgan.richomme@orange.com> Change-Id: I97af60a9c2acb8e9cd6ea0323ad906e759b822d7 Signed-off-by: mrichomme <morgan.richomme@orange.com>
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..28974ca
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,24 @@
+FROM openjdk:11.0.5-jre-slim
+
+LABEL maintainer="ONAP Integration team, morgan.richomme@orange.com"
+LABEL Description="Reference ONAP JAVA 11 image"
+
+ENV JAVA_OPTS="-Xms256m -Xmx1g"
+ENV JAVA_SEC_OPTS=""
+
+ARG user=onap
+ARG group=onap
+
+# Create a group and user
+RUN groupadd -r $group && useradd -ms /bin/bash $user -g $group && \
+ mkdir /opt/$user && \
+ chown -R $user:$group /opt/$user && \
+ mkdir /var/log/$user && \
+ chown -R $user:$group /var/log/$user
+
+
+# Tell docker that all future commands should be run as the onap user
+USER $user
+WORKDIR /opt/$user
+
+ENTRYPOINT exec java $JAVA_SEC_OPTS $JAVA_OPTS -jar /opt/$user/app.jar