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 && \ |
vasraz | 9efabf2 | 2022-08-20 10:13:09 +0100 | [diff] [blame] | 25 | gem install public_suffix -v 4.0.7 --no-document && \ |
vasraz | 101e0a8 | 2022-06-09 19:36:13 +0100 | [diff] [blame] | 26 | gem install multipart-post -v 2.2.0 --no-document && \ |
eschcam | 16a6ce0 | 2022-12-09 10:28:58 +0000 | [diff] [blame^] | 27 | gem install chef:13.8.5 berkshelf:6.3.1 io-console:0.4.6 webrick --no-document && \ |
| 28 | gem install etc -v 1.3.0 --no-document && \ |
vasraz | 987fc74 | 2021-11-29 17:42:02 +0000 | [diff] [blame] | 29 | apk del .build-dependencies && \ |
| 30 | gem cleanup |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 31 | |
| 32 | ENV ONAP_LOG=/home/onap/logs |
| 33 | RUN mkdir $ONAP_LOG && chown onap:onap $ONAP_LOG |
| 34 | |
| 35 | # user/group are the same as in integration/docker/onap-python base image |
| 36 | ENV user=onap group=onap |
| 37 | |
| 38 | USER onap |
Yuli Shlosberg | 958c32d | 2018-02-15 12:04:46 +0200 | [diff] [blame] | 39 | |
k.kedron | cb30f3a | 2020-03-05 13:12:27 +0100 | [diff] [blame] | 40 | # user/group args are inherited from base_sdc-python base image |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 41 | COPY --chown=onap:onap scripts /home/onap/scripts |
Yuli Shlosberg | 958c32d | 2018-02-15 12:04:46 +0200 | [diff] [blame] | 42 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 43 | RUN chmod 770 -R /home/onap/scripts && \ |
| 44 | cd /home/onap/scripts && \ |
k.kedron | cb30f3a | 2020-03-05 13:12:27 +0100 | [diff] [blame] | 45 | python setup.py install --user |
Yuli Shlosberg | 958c32d | 2018-02-15 12:04:46 +0200 | [diff] [blame] | 46 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 47 | ENV PATH=$PATH:/home/onap/.local/bin |
Yuli Shlosberg | 958c32d | 2018-02-15 12:04:46 +0200 | [diff] [blame] | 48 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 49 | COPY --chown=onap:onap chef-solo /home/onap/chef-solo/ |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 50 | COPY --chown=onap:onap chef-repo/cookbooks /home/onap/chef-solo/cookbooks/ |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 51 | COPY --chown=onap:onap startup.sh /home/onap/ |
k.kedron | cb30f3a | 2020-03-05 13:12:27 +0100 | [diff] [blame] | 52 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 53 | RUN chmod 770 /home/onap/startup.sh |
k.kedron | cb30f3a | 2020-03-05 13:12:27 +0100 | [diff] [blame] | 54 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 55 | WORKDIR /home/onap/ |
k.kedron | cb30f3a | 2020-03-05 13:12:27 +0100 | [diff] [blame] | 56 | |
| 57 | ENTRYPOINT /home/${user}/startup.sh |