blob: f0f827de0b78ff74ce1a78ef328fb8839e901baa [file] [log] [blame]
JoeOLearybecd8ee2019-01-28 13:44:27 +00001#
2# ============LICENSE_START=======================================================
JoeOLeary25523562020-01-14 10:54:59 +00003# Copyright (C) 2019-2020 Nordix Foundation.
JoeOLearybecd8ee2019-01-28 13:44:27 +00004# ================================================================================
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17# SPDX-License-Identifier: Apache-2.0
18# ============LICENSE_END=========================================================
19#
JoeOLearyd5270c62020-06-22 14:01:13 +010020FROM openjdk:11.0.7-jre-slim
dfarrelly2d336f92019-02-22 15:31:10 +000021
JoeOLeary924ab472019-02-15 13:46:01 +000022WORKDIR /opt/app/pm-mapper
dfarrelly2d336f92019-02-22 15:31:10 +000023
JoeOLearyd5270c62020-06-22 14:01:13 +010024RUN apt-get update && \
Remigiusz Janeczekae8adbc2020-07-06 08:56:09 +020025 apt-get install --no-install-recommends -y curl nano && \
JoeOLearyd5270c62020-06-22 14:01:13 +010026 apt-get clean && \
27 rm -rf /var/lib/apt/lists/*
ejamcud8dda7f12019-07-11 14:17:55 +010028
dfarrelly2d336f92019-02-22 15:31:10 +000029RUN mkdir -p /var/log/ONAP
dfarrelly2d336f92019-02-22 15:31:10 +000030
dfarrelly924a8052019-07-24 16:17:13 +000031RUN adduser pm-mapper; \
32 chmod a+rwx /var/log/ONAP; \
33 chown -R pm-mapper /opt/app/pm-mapper
dfarrelly2d336f92019-02-22 15:31:10 +000034
35USER pm-mapper
dfarrelly924a8052019-07-24 16:17:13 +000036
37COPY ${project.build.directory}/${ext.dep.dir.path}/ ${ext.dep.dir.path}/
38COPY ${project.build.directory}/${JAR} .
39
JoeOLeary25523562020-01-14 10:54:59 +000040COPY ${project.build.directory}/classes/schemas ./etc/schemas/
41COPY ${project.build.directory}/classes/templates ./etc/templates/
dfarrelly924a8052019-07-24 16:17:13 +000042COPY ${project.build.directory}/classes/reconfigure.sh ./etc/reconfigure.sh
43COPY --chown=pm-mapper ${project.build.directory}/classes/logback.xml ./etc/logback.xml
44
45
46LABEL git.branch="${git.branch}" \
47 git.build.host="${git.build.host}" \
48 git.build.time="${git.build.time}" \
49 git.build.user.email="${git.build.user.email}" \
50 git.build.user.name="${git.build.user.name}" \
51 git.build.version="${git.build.version}" \
52 git.closest.tag.name="${git.closest.tag.name}" \
53 git.commit.id="${git.commit.id}" \
54 git.commit.message.short="${git.commit.message.short}" \
55 git.commit.time="${git.commit.time}" \
56 git.commit.user.email="${git.commit.user.email}" \
57 git.commit.user.name="${git.commit.user.name}"
58
59
JoeOLeary014b9372020-08-04 12:58:01 +010060ENTRYPOINT ["/usr/local/openjdk-11/bin/java", "-jar", "${project.artifactId}-${project.version}.jar"]
dfarrelly924a8052019-07-24 16:17:13 +000061ARG JAR