1 # ============LICENSE_START=======================================================
3 # ================================================================================
4 # Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved.
5 # Copyright (c) 2021 J. F. Lucas. All rights reserved.
6 # ================================================================================
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 # ============LICENSE_END=========================================================
20 # cloudify CLI requires python 3.6
21 # won't work with 3.7 or later, hence won't work
22 # with the ONAP integration-python base images
23 FROM python:3.6-alpine
24 LABEL maintainer="ONAP DCAE Team"
25 LABEL Description="DCAE bootstrap image"
30 # Install packages needed for cloudify and for running bootstrap script
31 RUN apk --no-cache add build-base libffi-dev openssl-dev curl bash
34 RUN curl -Ssf -L "https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64" > /bin/jq \
37 # Install rust (needed for "cryptography", needed for "cloudify"
38 RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /rustinstall \
39 && chmod +x /rustinstall \
42 # Install pip and Cloudify CLI
43 RUN source /root/.cargo/env \
44 && pip install --upgrade pip \
45 && pip install cloudify==5.1.1
49 COPY scripts/ /scripts
51 # Load blueprints and input templates
52 COPY blueprints/ /blueprints
54 # Set up runtime script
55 ENTRYPOINT exec "/scripts/bootstrap.sh"
57 # Make scripts executable & set up a non-root user
58 RUN chmod +x /scripts/*.sh \
59 && mkdir -p /opt/bootstrap \
60 && addgroup -S $group \
61 && adduser -S -D -h /opt/bootstrap -s /bin/bash $user $group \
62 && chown -R $user:$group /opt/bootstrap \
63 && chown -R $user:$group /scripts \
64 && chown -R $user:$group /blueprints