blob: 2714a357d88ad0583cea1c52cd969063ff1ba298 [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 && \
vasraz987fc742021-11-29 17:42:02 +000027 gem install chef:13.8.5 berkshelf:6.3.1 io-console:0.4.6 etc webrick --no-document && \
28 apk del .build-dependencies && \
29 gem cleanup
sebdetdf353be2020-09-21 22:13:05 +020030
31ENV ONAP_LOG=/home/onap/logs
32RUN mkdir $ONAP_LOG && chown onap:onap $ONAP_LOG
33
34# user/group are the same as in integration/docker/onap-python base image
35ENV user=onap group=onap
36
37USER onap
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020038
k.kedroncb30f3a2020-03-05 13:12:27 +010039# user/group args are inherited from base_sdc-python base image
sebdetdf353be2020-09-21 22:13:05 +020040COPY --chown=onap:onap scripts /home/onap/scripts
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020041
sebdetdf353be2020-09-21 22:13:05 +020042RUN chmod 770 -R /home/onap/scripts && \
43 cd /home/onap/scripts && \
k.kedroncb30f3a2020-03-05 13:12:27 +010044 python setup.py install --user
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020045
sebdetdf353be2020-09-21 22:13:05 +020046ENV PATH=$PATH:/home/onap/.local/bin
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020047
sebdetdf353be2020-09-21 22:13:05 +020048COPY --chown=onap:onap chef-solo /home/onap/chef-solo/
sebdetdf353be2020-09-21 22:13:05 +020049COPY --chown=onap:onap chef-repo/cookbooks /home/onap/chef-solo/cookbooks/
sebdetdf353be2020-09-21 22:13:05 +020050COPY --chown=onap:onap startup.sh /home/onap/
k.kedroncb30f3a2020-03-05 13:12:27 +010051
sebdetdf353be2020-09-21 22:13:05 +020052RUN chmod 770 /home/onap/startup.sh
k.kedroncb30f3a2020-03-05 13:12:27 +010053
sebdetdf353be2020-09-21 22:13:05 +020054WORKDIR /home/onap/
k.kedroncb30f3a2020-03-05 13:12:27 +010055
56ENTRYPOINT /home/${user}/startup.sh