diff options
author | mrichomme <morgan.richomme@orange.com> | 2020-08-07 14:54:22 +0200 |
---|---|---|
committer | mrichomme <morgan.richomme@orange.com> | 2020-08-10 13:47:01 +0200 |
commit | abdb7a9b2769033983b12949f98618da02efa21a (patch) | |
tree | d7e819723782ff5e6a24a6b86cf94179b7155159 | |
parent | 529ee210e9e6465de781ab5bae5d02e7474d80ff (diff) |
Create alpine java11 baseline image
It is based on openjdk11:jre-11.0.8_10-alpine
As it is based on alpine it is GPLv3 free
Issue-ID: INT-1680
Signed-off-by: mrichomme <morgan.richomme@orange.com>
Change-Id: I80f5edea0c4d579e132229c8567a22de7b146d01
Signed-off-by: mrichomme <morgan.richomme@orange.com>
-rw-r--r-- | Dockerfile | 17 | ||||
-rw-r--r-- | version.properties | 14 |
2 files changed, 22 insertions, 9 deletions
@@ -1,7 +1,7 @@ -FROM openjdk:11.0.6-jre-slim +FROM adoptopenjdk/openjdk11:jre-11.0.8_10-alpine LABEL maintainer="ONAP Integration team, morgan.richomme@orange.com" -LABEL Description="Reference ONAP JAVA 11 image" +LABEL Description="Reference ONAP JAVA 11 image based on alpine" ENV JAVA_OPTS="-Xms256m -Xmx1g" ENV JAVA_SEC_OPTS="" @@ -10,15 +10,14 @@ 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 && \ +RUN addgroup -S $group && adduser -G $group -D $user && \ mkdir /var/log/$user && \ - chown -R $user:$group /var/log/$user - + mkdir /app && \ + chown -R $user:$group /var/log/$user && \ + chown -R $user:$group /app # Tell docker that all future commands should be run as the onap user USER $user -WORKDIR /opt/$user +WORKDIR /app -ENTRYPOINT exec java $JAVA_SEC_OPTS $JAVA_OPTS -jar /opt/$user/app.jar +ENTRYPOINT exec java $JAVA_SEC_OPTS $JAVA_OPTS -jar /app/app.jar diff --git a/version.properties b/version.properties new file mode 100644 index 0000000..0d3ec56 --- /dev/null +++ b/version.properties @@ -0,0 +1,14 @@ +########################################################### +# Versioning variables +# Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... ) +# because they are used in Jenkins, whose plug-in doesn't support + +major_version=7 +minor_version=0 +patch_version=0 + +base_version=${major_version}.${minor_version}.${patch_version} + +# Release must be completed with GIT information # in Jenkins +release_version=${base_version} +snapshot_version=${base_version}-SNAPSHOT |