JvD_Ericsson | 2cecd88 | 2023-06-13 08:48:16 +0100 | [diff] [blame] | 1 | FROM onap/integration-python:8.0.0 |
| 2 | |
| 3 | USER root |
| 4 | |
| 5 | # Needed for pycurl |
| 6 | ENV PYCURL_SSL_LIBRARY=openssl |
| 7 | |
| 8 | # Install packages only needed for building |
| 9 | RUN 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 | python -m pip install --upgrade pip \ |
| 23 | pip install 'pycurl==7.44.1' && \ |
| 24 | set -ex && \ |
| 25 | gem update --system --no-document && \ |
| 26 | gem install --no-update-sources public_suffix:4.0.7 multipart-post:2.2.0 etc:1.3.0 bundler:2.3.26 chef:13.8.5 berkshelf:6.3.1 io-console:0.4.6 webrick --no-document && \ |
| 27 | apk del .build-dependencies && \ |
| 28 | gem cleanup |
| 29 | |
| 30 | ENV ONAP_LOG=/home/onap/logs |
| 31 | RUN mkdir $ONAP_LOG && chown onap:onap $ONAP_LOG |
| 32 | |
| 33 | # user/group are the same as in integration/docker/onap-python base image |
| 34 | ENV user=onap group=onap |
| 35 | |
| 36 | USER onap |
| 37 | |
| 38 | # user/group args are inherited from base_sdc-python base image |
| 39 | COPY --chown=onap:onap scripts /home/onap/scripts |
| 40 | |
| 41 | RUN chmod 770 -R /home/onap/scripts && \ |
| 42 | cd /home/onap/scripts && \ |
| 43 | python setup.py install --user |
| 44 | |
| 45 | ENV PATH=$PATH:/home/onap/.local/bin |
| 46 | |
| 47 | COPY --chown=onap:onap chef-solo /home/onap/chef-solo/ |
| 48 | COPY --chown=onap:onap chef-repo/cookbooks /home/onap/chef-solo/cookbooks/ |
| 49 | COPY --chown=onap:onap startup.sh /home/onap/ |
| 50 | |
| 51 | RUN chmod 770 /home/onap/startup.sh |
| 52 | |
| 53 | WORKDIR /home/onap/ |
| 54 | |
| 55 | ENTRYPOINT /home/${user}/startup.sh |