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 && \ |
| 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 | |
| 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/ |
Yuli Shlosberg | 958c32d | 2018-02-15 12:04:46 +0200 | [diff] [blame] | 50 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 51 | COPY --chown=onap:onap chef-repo/cookbooks /home/onap/chef-solo/cookbooks/ |
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 | COPY --chown=onap:onap startup.sh /home/onap/ |
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 | RUN chmod 770 /home/onap/startup.sh |
k.kedron | cb30f3a | 2020-03-05 13:12:27 +0100 | [diff] [blame] | 56 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 57 | WORKDIR /home/onap/ |
k.kedron | cb30f3a | 2020-03-05 13:12:27 +0100 | [diff] [blame] | 58 | |
| 59 | ENTRYPOINT /home/${user}/startup.sh |