[DMAAP-BC] Consolidate bus controller repos
[dmaap/buscontroller.git] / dbc-client / src / main / resources / Dockerfile
1 #########
2 #  ============LICENSE_START====================================================
3 #  org.onap.dmaap
4 #  ===========================================================================
5 #  Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 #  Modifications Copyright (C) 2018 Nokia. All rights reserved.
7 #  Modifications copyright (C) 2021 Nordix Foundation..
8 #  ===========================================================================
9 #  Licensed under the Apache License, Version 2.0 (the "License");
10 #  you may not use this file except in compliance with the License.
11 #  You may obtain a copy of the License at
12 #
13 #       http://www.apache.org/licenses/LICENSE-2.0
14 #
15 #  Unless required by applicable law or agreed to in writing, software
16 #  distributed under the License is distributed on an "AS IS" BASIS,
17 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 #  See the License for the specific language governing permissions and
19 #  limitations under the License.
20 #  ============LICENSE_END====================================================
21 #
22 FROM alpine:3.8
23
24 MAINTAINER DMAAP Team
25
26 COPY /opt /opt
27
28 WORKDIR /opt/app/dbc-client
29
30 # Install AAF CA certificate
31 RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
32 RUN mkdir -p /usr/local/share/ca-certificates && \
33     mv misc/aaf-ca.crt /usr/local/share/ca-certificates/aaf-ca.crt
34 RUN update-ca-certificates
35
36 # Install curl & openssl
37 RUN apk add --no-cache curl openssl
38
39 RUN mkdir -p /opt/app/osaaf/local && \
40     chmod +x /opt/app/dbc-client/bin/* && \
41     mkdir /opt/app/dbc-client/logs
42
43 RUN addgroup -S -g 1001 onap \
44     && adduser -S -u 1000 onap -G onap \
45     && chown -R onap:onap /opt/
46
47 USER onap
48
49 ENTRYPOINT ["sh", "./bin/dbc-client" ]