blob: 76e502ab16b1f00548371f093b637186b11e0691 [file] [log] [blame]
JvD_Ericsson2cecd882023-06-13 08:48:16 +01001FROM 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 && \
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 update --system --no-document && \
26 gem install --no-update-sources public_suffix:4.0.7 multipart-post:2.2.0 etc:1.3.0 bundler:2.3.26 chef:13.8.5 berkshelf:6.3.1 io-console:0.4.6 webrick --no-document && \
27 apk del .build-dependencies && \
28 gem cleanup
29
30ENV ONAP_LOG=/home/onap/logs
31RUN mkdir $ONAP_LOG && chown onap:onap $ONAP_LOG
32
33# user/group are the same as in integration/docker/onap-python base image
34ENV user=onap group=onap
35
36USER onap
37
38# user/group args are inherited from base_sdc-python base image
39COPY --chown=onap:onap scripts /home/onap/scripts
40
41RUN chmod 770 -R /home/onap/scripts && \
42 cd /home/onap/scripts && \
43 python setup.py install --user
44
45ENV PATH=$PATH:/home/onap/.local/bin
46
47COPY --chown=onap:onap chef-solo /home/onap/chef-solo/
48COPY --chown=onap:onap chef-repo/cookbooks /home/onap/chef-solo/cookbooks/
49COPY --chown=onap:onap startup.sh /home/onap/
50
51RUN chmod 770 /home/onap/startup.sh
52
53WORKDIR /home/onap/
54
55ENTRYPOINT /home/${user}/startup.sh