blob: 8f6da77d19d77a5c9b6f6a227d990155e6a63e49 [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 && \
vasraz987fc742021-11-29 17:42:02 +000021 # needed libcurl to install correctly \
22 python -m pip install --upgrade pip \
23 pip install 'pycurl==7.44.1' && \
24 set -ex && \
25 gem install chef:13.8.5 berkshelf:6.3.1 io-console:0.4.6 etc webrick --no-document && \
26 apk del .build-dependencies && \
27 gem cleanup
sebdetdf353be2020-09-21 22:13:05 +020028
29ENV ONAP_LOG=/home/onap/logs
30RUN mkdir $ONAP_LOG && chown onap:onap $ONAP_LOG
31
32# user/group are the same as in integration/docker/onap-python base image
33ENV user=onap group=onap
34
35USER onap
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020036
k.kedroncb30f3a2020-03-05 13:12:27 +010037# user/group args are inherited from base_sdc-python base image
sebdetdf353be2020-09-21 22:13:05 +020038COPY --chown=onap:onap scripts /home/onap/scripts
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020039
sebdetdf353be2020-09-21 22:13:05 +020040RUN chmod 770 -R /home/onap/scripts && \
41 cd /home/onap/scripts && \
k.kedroncb30f3a2020-03-05 13:12:27 +010042 python setup.py install --user
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020043
sebdetdf353be2020-09-21 22:13:05 +020044ENV PATH=$PATH:/home/onap/.local/bin
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020045
sebdetdf353be2020-09-21 22:13:05 +020046COPY --chown=onap:onap chef-solo /home/onap/chef-solo/
sebdetdf353be2020-09-21 22:13:05 +020047COPY --chown=onap:onap chef-repo/cookbooks /home/onap/chef-solo/cookbooks/
sebdetdf353be2020-09-21 22:13:05 +020048COPY --chown=onap:onap startup.sh /home/onap/
k.kedroncb30f3a2020-03-05 13:12:27 +010049
sebdetdf353be2020-09-21 22:13:05 +020050RUN chmod 770 /home/onap/startup.sh
k.kedroncb30f3a2020-03-05 13:12:27 +010051
sebdetdf353be2020-09-21 22:13:05 +020052WORKDIR /home/onap/
k.kedroncb30f3a2020-03-05 13:12:27 +010053
54ENTRYPOINT /home/${user}/startup.sh