Update blueprints to use k8splugin in version range >=3.4.3,<4.0.0
[dcaegen2/platform/blueprints.git] / Dockerfile-template
1 # ============LICENSE_START=======================================================
2 # org.onap.dcae
3 # ================================================================================
4 # Copyright (c) 2018-2020 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 FROM centos:7.4.1708
20 LABEL maintainer="maintainer"
21
22 # Install gcc
23 RUN yum install -y gcc python-devel
24
25 # Install jq
26 RUN curl -Ssf -L "https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64"  > /bin/jq \
27 && chmod +x /bin/jq
28
29 # Install pip and Cloudify CLI
30 RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
31   && python get-pip.py \
32   && rm get-pip.py \
33   && pip install cloudify==20.03.03
34
35 # Copy scripts
36 RUN mkdir scripts
37 COPY scripts/ /scripts
38
39 # Load blueprints and input templates
40 COPY blueprints/  /blueprints
41
42 # Set up runtime script
43 ENTRYPOINT exec "/scripts/bootstrap.sh"
44
45 # Make scripts executable & set up a non-root user
46 RUN chmod +x /scripts/*.sh \
47   && mkdir -p /opt/bootstrap \
48   && useradd -d /opt/bootstrap bootstrap \
49   && chown -R bootstrap:bootstrap /opt/bootstrap \
50   && chown -R bootstrap:bootstrap /scripts \
51   && chown -R bootstrap:bootstrap /blueprints
52
53 USER bootstrap