diff options
-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 |