blob: 6bf6bfb53a13f21b743b927034f4b896350e2143 [file] [log] [blame]
Jack Lucasbad77202020-02-03 18:21:29 -05001# ============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
19FROM centos:7.4.1708
20LABEL maintainer="maintainer"
21
Jack Lucasbad77202020-02-03 18:21:29 -050022# Install gcc
23RUN yum install -y gcc python-devel
24
Jack Lucasbad77202020-02-03 18:21:29 -050025# Install jq
26RUN curl -Ssf -L "https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64" > /bin/jq \
27&& chmod +x /bin/jq
28
Jack Lucas01d60192020-06-17 17:11:17 -040029# Install pip and Cloudify CLI
Jack Lucasbad77202020-02-03 18:21:29 -050030RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
31 && python get-pip.py \
32 && rm get-pip.py \
Jack Lucas4fbcea52020-08-31 11:01:04 -040033 && pip install cloudify==20.03.03
Jack Lucasbad77202020-02-03 18:21:29 -050034
35# Copy scripts
36RUN mkdir scripts
37COPY scripts/ /scripts
38
Jack Lucasbad77202020-02-03 18:21:29 -050039# Load blueprints and input templates
40COPY blueprints/ /blueprints
41
42# Set up runtime script
43ENTRYPOINT exec "/scripts/bootstrap.sh"
Jack Lucas879dbd62020-03-04 11:06:57 -050044
Jack Lucas01d60192020-06-17 17:11:17 -040045# Make scripts executable & set up a non-root user
46RUN chmod +x /scripts/*.sh \
47 && mkdir -p /opt/bootstrap \
Jack Lucas879dbd62020-03-04 11:06:57 -050048 && useradd -d /opt/bootstrap bootstrap \
49 && chown -R bootstrap:bootstrap /opt/bootstrap \
50 && chown -R bootstrap:bootstrap /scripts \
Jack Lucas01d60192020-06-17 17:11:17 -040051 && chown -R bootstrap:bootstrap /blueprints
52
Jack Lucas879dbd62020-03-04 11:06:57 -050053USER bootstrap