blob: cee8d75194760ea92bcb44b749530e743600263b [file] [log] [blame]
PatrikBuhra363dc52023-03-03 14:02:50 +01001#
2# ============LICENSE_START=======================================================
3# Copyright (C) 2023 Nordix Foundation.
4# Copyright (C) 2020 Nokia.
5# Copyright (C) 2021 Samsung Electronics.
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:17-jdk-slim
23
24EXPOSE 8100 8433
25
26ARG user=datafile
27ARG group=datafile
28
29USER root
30WORKDIR /opt/app/datafile
31
32ADD /config/application.yaml /opt/app/datafile/config/
33ADD /config/ftps_keystore.pass /opt/app/datafile/config/
34ADD /config/ftps_keystore.p12 /opt/app/datafile/config/
35ADD /config/keystore.jks /opt/app/datafile/config/
36ADD /config/truststore.jks /opt/app/datafile/config/
37ADD /config/truststore.pass /opt/app/datafile/config/
38
39
40
41
42RUN mkdir -p /var/log/ONAP /opt/app/datafile/etc/cert/ && \
43 addgroup $group && adduser --system --disabled-password --no-create-home --ingroup $group $user && \
44 chown -R $user:$group /var/log/ONAP /opt/app/datafile/config && \
45 chmod -R u+rw /opt/app/datafile/config/
46
47
48USER $user
49
50COPY --chown=$user:$group /target/datafile-app-server.jar /opt/app/datafile/
51ENTRYPOINT ["java", "-jar", "/opt/app/datafile/datafile-app-server.jar"]