blob: a2c59c40a26c4c67abfb8dc6d1007be80cc4ed05 (
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
|
FROM nexus3.onap.org:10001/onap/integration-java11:8.0.0
MAINTAINER Rajiv Singla <rs153v@att.com>
ARG PROJECT_BUILD_DIR_NAME
ARG FINAL_JAR
ARG DEPENDENCIES_DIR
ARG DOCKER_ARTIFACT_DIR
ARG user=tca-gen2
ARG group=tca-gen2
USER root
RUN mkdir -p /var/log/ONAP/dcaegen2/analytics/tca-gen2
#Add a new user and group to allow container to be run as non-root
RUN addgroup $group && adduser --system --disabled-password --no-create-home --ingroup $group $user && \
chmod 775 /opt && \
chmod 775 /var/log/ONAP/dcaegen2/analytics/tca-gen2 && \
chown -R $user:$group /opt && \
chown -R $user:$group /var/log/ONAP/dcaegen2/analytics/tca-gen2
#Copy dependencies and executable jar
WORKDIR ${DOCKER_ARTIFACT_DIR}
COPY ${PROJECT_BUILD_DIR_NAME}/${FINAL_JAR} .
#Overcome Docker limitation to put ARG inside ENTRYPOINT
RUN ln -s ${FINAL_JAR} tca-gen2.jar
EXPOSE 8100
USER $user:$group
ENTRYPOINT ["java", "-Dspring.profiles.active=configBindingService,dmaap,mongo", "-jar", "tca-gen2.jar"]
|