Add ConfigurationController
[ccsdk/oran.git] / a1-policy-management / Dockerfile
1 #
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 #
22 FROM openjdk:11-jre-slim
23
24 #install vim editor
25 RUN apt-get update
26 RUN apt-get install -y vim
27
28 #install curl
29 RUN apt-get install -y curl
30
31 EXPOSE 8081 8433
32
33 ARG JAR
34
35 WORKDIR /opt/app/policy-agent
36 RUN mkdir -p /var/log/policy-agent
37 RUN mkdir -p /opt/app/policy-agent/etc/cert/
38
39 RUN groupadd -r onap && useradd -ms /bin/bash a1pms -g onap
40 RUN chown -R a1pms:onap /var/log/policy-agent
41
42 ADD /config/application.yaml /opt/app/policy-agent/config/application.yaml
43 ADD /config/application_configuration.json /opt/app/policy-agent/data/application_configuration.json_example
44 ADD /config/keystore.jks /opt/app/policy-agent/etc/cert/keystore.jks
45 ADD /config/truststore.jks /opt/app/policy-agent/etc/cert/truststore.jks
46
47 RUN chmod -R 777 /opt/app/policy-agent/config/
48 RUN chmod -R 777 /opt/app/policy-agent/data/
49
50 USER a1pms
51
52 ADD target/${JAR} /opt/app/policy-agent/a1-policy-management-service.jar
53 CMD ["java", "-jar", "/opt/app/policy-agent/a1-policy-management-service.jar"]