blob: c573ae953cd1d2d8cc657e38d9630a2cd351d643 (
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
|
# NOTE: This Dockerfile is auto generated and filtered via maven resources plugin.
# Edits to generated Dockerfile will NOT be saved.
# Only changes made in docker/Dockerfile template file will be persistent
# ==========================================================================
FROM openjdk:8-jre-alpine
MAINTAINER Rajiv Singla <rs153v@att.com>
ARG PROJECT_BUILD_DIR_NAME
ARG FINAL_JAR
ARG DEPENDENCIES_DIR
ARG DOCKER_ARTIFACT_DIR
#Add a new user and group to allow container to be run as non-root
RUN addgroup -S tca-gen2 && adduser -S -G tca-gen2 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 tca-gen2:tca-gen2
ENTRYPOINT ["java", "-jar", "tca-gen2.jar"]
|