blob: f70cac6150ced8677d1ec19b3ea3841306566766 [file] [log] [blame]
mrichommeabdb7a92020-08-07 14:54:22 +02001FROM adoptopenjdk/openjdk11:jre-11.0.8_10-alpine
mrichommeb095cb92020-01-20 18:23:08 +01002
3LABEL maintainer="ONAP Integration team, morgan.richomme@orange.com"
mrichommeabdb7a92020-08-07 14:54:22 +02004LABEL Description="Reference ONAP JAVA 11 image based on alpine"
mrichommeb095cb92020-01-20 18:23:08 +01005
6ENV JAVA_OPTS="-Xms256m -Xmx1g"
7ENV JAVA_SEC_OPTS=""
8
9ARG user=onap
10ARG group=onap
11
Jan Malkiewicz0a8d7ec2020-12-01 14:32:52 +010012# Install additional tools
13RUN apk add --no-cache openssl
14
mrichommeb095cb92020-01-20 18:23:08 +010015# Create a group and user
mrichommeabdb7a92020-08-07 14:54:22 +020016RUN addgroup -S $group && adduser -G $group -D $user && \
mrichommeb095cb92020-01-20 18:23:08 +010017 mkdir /var/log/$user && \
mrichommeabdb7a92020-08-07 14:54:22 +020018 mkdir /app && \
19 chown -R $user:$group /var/log/$user && \
20 chown -R $user:$group /app
mrichommeb095cb92020-01-20 18:23:08 +010021
22# Tell docker that all future commands should be run as the onap user
23USER $user
mrichommeabdb7a92020-08-07 14:54:22 +020024WORKDIR /app
mrichommeb095cb92020-01-20 18:23:08 +010025
mrichommeabdb7a92020-08-07 14:54:22 +020026ENTRYPOINT exec java $JAVA_SEC_OPTS $JAVA_OPTS -jar /app/app.jar