blob: e47f88bd1b3d0c3ff5d5f2031e60b53f1e26c857 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
ARG java_ver=onap-java11
# Java v11 base image
FROM eclipse-temurin:11.0.18_10-jre-alpine AS onap-java11
# Java v17 base image
FROM eclipse-temurin:17.0.6_10-jre-alpine AS onap-java17
FROM ${java_ver} AS onap-java-final
LABEL maintainer="ONAP Integration team"
LABEL Description="Reference ONAP JAVA image based on alpine"
ENV JAVA_OPTS="-Xms256m -Xmx1g"
ENV JAVA_SEC_OPTS=""
ARG user=onap
ARG group=onap
# Install additional tools
RUN apk add --no-cache openssl ca-certificates
# Create a group and user
RUN addgroup -S $group && adduser -G $group -D $user && \
mkdir /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 /app
ENTRYPOINT exec java $JAVA_SEC_OPTS $JAVA_OPTS -jar /app/app.jar
|