blob: 35e485b197f0ea7fa6f048b9d174ab5a7cd43dad [file] [log] [blame]
sebdetdf353be2020-09-21 22:13:05 +02001FROM onap/integration-python:8.0.0
2
3USER root
4
5# Needed for pycurl
6ENV PYCURL_SSL_LIBRARY=openssl
7
8# Install packages only needed for building
9RUN apk update && \
10 apk add binutils jq libpng && \
11 apk add --no-cache \
12 libcurl \
13 ruby && \
14 apk add --no-cache --virtual .build-dependencies \
15 libressl-dev \
16 ruby-dev \
17 libffi-dev \
18 libxml2-dev \
19 build-base \
20 curl-dev && \
21 # needed libcurl to install correctly
22 pip install 'pycurl==7.43.0.1' && \
23 set -ex && \
24 gem install \
25 chef:13.8.5 \
26 berkshelf:6.3.1 \
27 io-console:0.4.6 \
28 etc webrick \
29 --no-document && \
30 apk del .build-dependencies
31
32ENV ONAP_LOG=/home/onap/logs
33RUN mkdir $ONAP_LOG && chown onap:onap $ONAP_LOG
34
35# user/group are the same as in integration/docker/onap-python base image
36ENV user=onap group=onap
37
38USER onap
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020039
k.kedroncb30f3a2020-03-05 13:12:27 +010040# user/group args are inherited from base_sdc-python base image
sebdetdf353be2020-09-21 22:13:05 +020041COPY --chown=onap:onap scripts /home/onap/scripts
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020042
sebdetdf353be2020-09-21 22:13:05 +020043RUN chmod 770 -R /home/onap/scripts && \
44 cd /home/onap/scripts && \
k.kedroncb30f3a2020-03-05 13:12:27 +010045 python setup.py install --user
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020046
sebdetdf353be2020-09-21 22:13:05 +020047ENV PATH=$PATH:/home/onap/.local/bin
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020048
sebdetdf353be2020-09-21 22:13:05 +020049COPY --chown=onap:onap chef-solo /home/onap/chef-solo/
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020050
sebdetdf353be2020-09-21 22:13:05 +020051COPY --chown=onap:onap chef-repo/cookbooks /home/onap/chef-solo/cookbooks/
k.kedroncb30f3a2020-03-05 13:12:27 +010052
sebdetdf353be2020-09-21 22:13:05 +020053COPY --chown=onap:onap startup.sh /home/onap/
k.kedroncb30f3a2020-03-05 13:12:27 +010054
sebdetdf353be2020-09-21 22:13:05 +020055RUN chmod 770 /home/onap/startup.sh
k.kedroncb30f3a2020-03-05 13:12:27 +010056
sebdetdf353be2020-09-21 22:13:05 +020057WORKDIR /home/onap/
k.kedroncb30f3a2020-03-05 13:12:27 +010058
59ENTRYPOINT /home/${user}/startup.sh