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