sebdet | df353be | 2020-09-21 22:13:05 +0200 | [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 && \ |
vasraz | 987fc74 | 2021-11-29 17:42:02 +0000 | [diff] [blame] | 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 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 |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 28 | |
| 29 | ENV ONAP_LOG=/home/onap/logs |
| 30 | RUN mkdir $ONAP_LOG && chown onap:onap $ONAP_LOG |
| 31 | |
| 32 | # user/group are the same as in integration/docker/onap-python base image |
| 33 | ENV user=onap group=onap |
| 34 | |
| 35 | USER onap |
Yuli Shlosberg | 958c32d | 2018-02-15 12:04:46 +0200 | [diff] [blame] | 36 | |
k.kedron | cb30f3a | 2020-03-05 13:12:27 +0100 | [diff] [blame] | 37 | # user/group args are inherited from base_sdc-python base image |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 38 | COPY --chown=onap:onap scripts /home/onap/scripts |
Yuli Shlosberg | 958c32d | 2018-02-15 12:04:46 +0200 | [diff] [blame] | 39 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 40 | RUN chmod 770 -R /home/onap/scripts && \ |
| 41 | cd /home/onap/scripts && \ |
k.kedron | cb30f3a | 2020-03-05 13:12:27 +0100 | [diff] [blame] | 42 | python setup.py install --user |
Yuli Shlosberg | 958c32d | 2018-02-15 12:04:46 +0200 | [diff] [blame] | 43 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 44 | ENV PATH=$PATH:/home/onap/.local/bin |
Yuli Shlosberg | 958c32d | 2018-02-15 12:04:46 +0200 | [diff] [blame] | 45 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 46 | COPY --chown=onap:onap chef-solo /home/onap/chef-solo/ |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 47 | COPY --chown=onap:onap chef-repo/cookbooks /home/onap/chef-solo/cookbooks/ |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 48 | COPY --chown=onap:onap startup.sh /home/onap/ |
k.kedron | cb30f3a | 2020-03-05 13:12:27 +0100 | [diff] [blame] | 49 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 50 | RUN chmod 770 /home/onap/startup.sh |
k.kedron | cb30f3a | 2020-03-05 13:12:27 +0100 | [diff] [blame] | 51 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 52 | WORKDIR /home/onap/ |
k.kedron | cb30f3a | 2020-03-05 13:12:27 +0100 | [diff] [blame] | 53 | |
| 54 | ENTRYPOINT /home/${user}/startup.sh |