vasraz | a2feaf9 | 2023-05-05 11:57:56 +0100 | [diff] [blame] | 1 | FROM onap/integration-java11:10.0.0 |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 2 | |
| 3 | USER root |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 4 | ARG JETTY_FOLDER=/app/jetty |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 5 | |
| 6 | # Install Chef |
| 7 | RUN set -ex && \ |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 8 | apk update && \ |
| 9 | apk add --no-cache \ |
eschcam | 30a2a7f | 2023-05-10 13:49:55 +0100 | [diff] [blame^] | 10 | wget \ |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 11 | build-base \ |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 12 | ruby \ |
| 13 | ruby-dev \ |
| 14 | libffi-dev \ |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 15 | libxml2-dev \ |
| 16 | libressl-dev && \ |
vasraz | 9efabf2 | 2022-08-20 10:13:09 +0100 | [diff] [blame] | 17 | gem install public_suffix -v 4.0.7 --no-document && \ |
vasraz | 101e0a8 | 2022-06-09 19:36:13 +0100 | [diff] [blame] | 18 | gem install multipart-post -v 2.2.0 --no-document && \ |
vasraz | 52d23fc | 2022-12-28 12:24:21 +0000 | [diff] [blame] | 19 | gem install etc -v 1.3.0 --no-document && \ |
| 20 | gem install bundler -v 2.3.26 --no-document && \ |
| 21 | gem install chef:13.8.5 berkshelf:6.3.1 io-console:0.4.6 webrick --no-document && \ |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 22 | gem cleanup && \ |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 23 | apk update |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 24 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 25 | ENV JETTY_HOME=$JETTY_FOLDER |
| 26 | ENV JETTY_BASE=$JETTY_FOLDER |
| 27 | ENV JETTY_USER=onap |
| 28 | ENV JETTY_GROUP=onap |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 29 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 30 | RUN mkdir $JETTY_FOLDER && chown onap:onap $JETTY_FOLDER |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 31 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 32 | USER onap |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 33 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 34 | #Download jetty |
eschcam | 30a2a7f | 2023-05-10 13:49:55 +0100 | [diff] [blame^] | 35 | RUN wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/${jetty-distribution.version}/jetty-distribution-${jetty-distribution.version}.tar.gz --tries=3 -O $JETTY_FOLDER/jetty.tar.gz -c && \ |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 36 | tar xvz -C $JETTY_FOLDER -f $JETTY_FOLDER/jetty.tar.gz --strip 1 && \ |
| 37 | rm -rf $JETTY_FOLDER/jetty.tar.gz |
| 38 | RUN sed -i 's/"jetty"/"onap"/g' $JETTY_FOLDER/etc/jetty-setuid.xml |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 39 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 40 | COPY --chown=onap:onap chef-solo $JETTY_FOLDER/chef-solo/ |
| 41 | COPY --chown=onap:onap chef-repo/cookbooks $JETTY_FOLDER/chef-solo/cookbooks/ |
| 42 | ADD --chown=onap:onap onboarding-be-*.war $JETTY_FOLDER/webapps/ |
| 43 | ADD --chown=onap:onap api-docs.war $JETTY_FOLDER/webapps/ |
| 44 | COPY --chown=onap:onap startup.sh $JETTY_FOLDER/ |
| 45 | |
| 46 | RUN chmod 770 $JETTY_FOLDER/startup.sh |
| 47 | |
| 48 | ENTRYPOINT [ "sh", "-c", "${JETTY_HOME}/startup.sh"] |