blob: 2851e1416c8419b2956de637d14e1031d8e95d1f [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 && \
vasraz9efabf22022-08-20 10:13:09 +010025 gem install public_suffix -v 4.0.7 --no-document && \
vasraz101e0a82022-06-09 19:36:13 +010026 gem install multipart-post -v 2.2.0 --no-document && \
eschcam16a6ce02022-12-09 10:28:58 +000027 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 && \
vasraz987fc742021-11-29 17:42:02 +000029 apk del .build-dependencies && \
30 gem cleanup
sebdetdf353be2020-09-21 22:13:05 +020031
32ENV ONAP_LOG=/home/onap/logs
33RUN mkdir $ONAP_LOG && chown onap:onap $ONAP_LOG
34
35# user/group are the same as in integration/docker/onap-python base image
36ENV user=onap group=onap
37
38USER onap
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020039
k.kedroncb30f3a2020-03-05 13:12:27 +010040# user/group args are inherited from base_sdc-python base image
sebdetdf353be2020-09-21 22:13:05 +020041COPY --chown=onap:onap scripts /home/onap/scripts
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020042
sebdetdf353be2020-09-21 22:13:05 +020043RUN chmod 770 -R /home/onap/scripts && \
44 cd /home/onap/scripts && \
k.kedroncb30f3a2020-03-05 13:12:27 +010045 python setup.py install --user
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020046
sebdetdf353be2020-09-21 22:13:05 +020047ENV PATH=$PATH:/home/onap/.local/bin
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020048
sebdetdf353be2020-09-21 22:13:05 +020049COPY --chown=onap:onap chef-solo /home/onap/chef-solo/
sebdetdf353be2020-09-21 22:13:05 +020050COPY --chown=onap:onap chef-repo/cookbooks /home/onap/chef-solo/cookbooks/
sebdetdf353be2020-09-21 22:13:05 +020051COPY --chown=onap:onap startup.sh /home/onap/
k.kedroncb30f3a2020-03-05 13:12:27 +010052
sebdetdf353be2020-09-21 22:13:05 +020053RUN chmod 770 /home/onap/startup.sh
k.kedroncb30f3a2020-03-05 13:12:27 +010054
sebdetdf353be2020-09-21 22:13:05 +020055WORKDIR /home/onap/
k.kedroncb30f3a2020-03-05 13:12:27 +010056
57ENTRYPOINT /home/${user}/startup.sh