blob: 7c732c1490187613a99dd5832d2fd63951267c5f [file] [log] [blame]
RehanRaza0e3740a2020-08-03 15:56:03 +02001#
2# ============LICENSE_START=======================================================
3# ONAP : ccsdk oran
4# ================================================================================
5# Copyright (C) 2019-2020 Nordix Foundation. All rights reserved.
6# ================================================================================
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18#
19# SPDX-License-Identifier: Apache-2.0
20# ============LICENSE_END=========================================================
21#
22FROM openjdk:11-jre-slim
23
24#install vim editor
25RUN apt-get update
26RUN apt-get install -y vim
27
28#install curl
29RUN apt-get install -y curl
30
31EXPOSE 8081 8433
32
33ARG JAR
34
35WORKDIR /opt/app/policy-agent
36RUN mkdir -p /var/log/policy-agent
37RUN mkdir -p /opt/app/policy-agent/etc/cert/
PatrikBuhr97a90012021-03-26 17:25:13 +010038RUN mkdir -p /var/policy-management-service
39RUN chmod -R 777 /var/policy-management-service
40
RehanRaza0e3740a2020-08-03 15:56:03 +020041
42RUN groupadd -r onap && useradd -ms /bin/bash a1pms -g onap
43RUN chown -R a1pms:onap /var/log/policy-agent
44
45ADD /config/application.yaml /opt/app/policy-agent/config/application.yaml
46ADD /config/application_configuration.json /opt/app/policy-agent/data/application_configuration.json_example
47ADD /config/keystore.jks /opt/app/policy-agent/etc/cert/keystore.jks
48ADD /config/truststore.jks /opt/app/policy-agent/etc/cert/truststore.jks
49
50RUN chmod -R 777 /opt/app/policy-agent/config/
51RUN chmod -R 777 /opt/app/policy-agent/data/
52
53USER a1pms
54
55ADD target/${JAR} /opt/app/policy-agent/a1-policy-management-service.jar
RehanRaza0e3740a2020-08-03 15:56:03 +020056CMD ["java", "-jar", "/opt/app/policy-agent/a1-policy-management-service.jar"]