blob: cc34c81f0998ce87d62ad7ed156283451ad97a0b [file] [log] [blame]
vasraza2feaf92023-05-05 11:57:56 +01001FROM onap/integration-java11:10.0.0
sebdet30670ac2020-08-04 14:16:00 +02002
3USER root
sebdetdf353be2020-09-21 22:13:05 +02004ARG JETTY_FOLDER=/app/jetty
sebdet30670ac2020-08-04 14:16:00 +02005
6# Install Chef
7RUN set -ex && \
sebdetdf353be2020-09-21 22:13:05 +02008 apk update && \
9 apk add --no-cache \
10 build-base \
sebdet30670ac2020-08-04 14:16:00 +020011 ruby \
12 ruby-dev \
13 libffi-dev \
sebdetdf353be2020-09-21 22:13:05 +020014 libxml2-dev \
15 libressl-dev && \
vasraz9efabf22022-08-20 10:13:09 +010016 gem install public_suffix -v 4.0.7 --no-document && \
vasraz101e0a82022-06-09 19:36:13 +010017 gem install multipart-post -v 2.2.0 --no-document && \
vasraz52d23fc2022-12-28 12:24:21 +000018 gem install etc -v 1.3.0 --no-document && \
19 gem install bundler -v 2.3.26 --no-document && \
20 gem install chef:13.8.5 berkshelf:6.3.1 io-console:0.4.6 webrick --no-document && \
sebdet30670ac2020-08-04 14:16:00 +020021 gem cleanup && \
sebdetdf353be2020-09-21 22:13:05 +020022 apk update
sebdet30670ac2020-08-04 14:16:00 +020023
sebdetdf353be2020-09-21 22:13:05 +020024ENV JETTY_HOME=$JETTY_FOLDER
25ENV JETTY_BASE=$JETTY_FOLDER
26ENV JETTY_USER=onap
27ENV JETTY_GROUP=onap
sebdet30670ac2020-08-04 14:16:00 +020028
sebdetdf353be2020-09-21 22:13:05 +020029RUN mkdir $JETTY_FOLDER && chown onap:onap $JETTY_FOLDER
sebdet30670ac2020-08-04 14:16:00 +020030
sebdetdf353be2020-09-21 22:13:05 +020031USER onap
Avi Zivc175a0d2018-03-15 13:21:44 +020032
sebdetdf353be2020-09-21 22:13:05 +020033#Download jetty
vasraz584dfd72022-03-03 11:38:39 +000034RUN wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/${jetty-distribution.version}/jetty-distribution-${jetty-distribution.version}.tar.gz -O $JETTY_FOLDER/jetty.tar.gz && \
sebdetdf353be2020-09-21 22:13:05 +020035 tar xvz -C $JETTY_FOLDER -f $JETTY_FOLDER/jetty.tar.gz --strip 1 && \
36 rm -rf $JETTY_FOLDER/jetty.tar.gz
37RUN sed -i 's/"jetty"/"onap"/g' $JETTY_FOLDER/etc/jetty-setuid.xml
Avi Zivc175a0d2018-03-15 13:21:44 +020038
sebdetdf353be2020-09-21 22:13:05 +020039COPY --chown=onap:onap chef-solo $JETTY_FOLDER/chef-solo/
40COPY --chown=onap:onap chef-repo/cookbooks $JETTY_FOLDER/chef-solo/cookbooks/
41ADD --chown=onap:onap onboarding-be-*.war $JETTY_FOLDER/webapps/
42ADD --chown=onap:onap api-docs.war $JETTY_FOLDER/webapps/
43COPY --chown=onap:onap startup.sh $JETTY_FOLDER/
44
45RUN chmod 770 $JETTY_FOLDER/startup.sh
46
47ENTRYPOINT [ "sh", "-c", "${JETTY_HOME}/startup.sh"]