b392e921c3c632549772a0ce4769a141b99d4fa0
[dcaegen2/deployments.git] / cm-container / Dockerfile-template
1 # ============LICENSE_START=======================================================
2 # org.onap.dcae
3 # ================================================================================
4 # Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
5 # ================================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #      http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 # ============LICENSE_END=========================================================
18 #
19 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
20 FROM cloudifyplatform/community:19.01.24
21 MAINTAINER maintainer
22
23 ENV TYPE_REPO {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}
24 ENV CCSDK_REPO {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}
25
26 # Store type files locally
27 RUN mkdir scripts
28 COPY scripts/* scripts/
29 # Load our type files and the Cloudify 3.4 type files
30 # Setup rc.local to set up k8s credentials for CM
31 RUN scripts/get-type-files.sh ${TYPE_REPO} ${CCSDK_REPO}\
32     && mkdir /opt/manager/resources/spec/cloudify/3.4\
33     && curl -Ss -L -f https://getcloudify.org/spec/cloudify/3.4/types.yaml > /opt/manager/resources/spec/cloudify/3.4/types.yaml\
34     && chown -R cfyuser:cfyuser /opt/manager/resources/spec/cloudify/3.4\
35     && chmod +x scripts/*.sh\
36     && /scripts/configure-tls.sh\
37     && echo "/scripts/setup-secret.sh" >> /etc/rc.d/rc.local\
38     && echo "/scripts/set-resolver-rules.sh" >> /etc/rc.d/rc.local\
39     && chmod +x /etc/rc.d/rc.local
40 # Create mount point for CM config file
41 RUN mkdir -p /opt/onap && chown cfyuser:cfyuser /opt/onap
42
43 # Install jq (used for cleanup--parsing output of CM API call)
44 RUN curl -Ss -L -f "https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64"  > /bin/jq \
45 && chmod +x /bin/jq
46
47 CMD ["/scripts/start-persistent.sh"]