vasraz | 987fc74 | 2021-11-29 17:42:02 +0000 | [diff] [blame] | 1 | FROM onap/integration-java11:9.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 \ |
| 10 | build-base \ |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 11 | ruby \ |
| 12 | ruby-dev \ |
| 13 | libffi-dev \ |
| 14 | libxml2-dev && \ |
vasraz | 987fc74 | 2021-11-29 17:42:02 +0000 | [diff] [blame] | 15 | gem install chef:13.8.5 berkshelf:6.3.1 io-console:0.4.6 etc webrick --no-document && \ |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 16 | gem cleanup && \ |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 17 | apk update |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 18 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 19 | ENV JETTY_HOME=$JETTY_FOLDER |
| 20 | ENV JETTY_BASE=$JETTY_FOLDER |
| 21 | ENV JETTY_USER=onap |
| 22 | ENV JETTY_GROUP=onap |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 23 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 24 | RUN mkdir $JETTY_FOLDER && chown onap:onap $JETTY_FOLDER |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 25 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 26 | USER onap |
Michael Lando | 9dd269d | 2017-02-20 01:04:22 +0200 | [diff] [blame] | 27 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 28 | #Download jetty |
vasraz | 8b1002a | 2021-12-08 22:12:52 +0000 | [diff] [blame] | 29 | RUN wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/${jetty.version}/jetty-distribution-${jetty.version}.tar.gz -O $JETTY_FOLDER/jetty.tar.gz && \ |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 30 | tar xvz -C $JETTY_FOLDER -f $JETTY_FOLDER/jetty.tar.gz --strip 1 && \ |
| 31 | rm -rf $JETTY_FOLDER/jetty.tar.gz |
| 32 | RUN sed -i 's/"jetty"/"onap"/g' $JETTY_FOLDER/etc/jetty-setuid.xml |
Michael Lando | 9dd269d | 2017-02-20 01:04:22 +0200 | [diff] [blame] | 33 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 34 | RUN mkdir -p $JETTY_FOLDER/config/catalog-fe |
| 35 | COPY --chown=onap:onap chef-solo $JETTY_FOLDER/chef-solo/ |
| 36 | COPY --chown=onap:onap chef-repo/cookbooks $JETTY_FOLDER/chef-solo/cookbooks/ |
| 37 | ADD --chown=onap:onap onboarding*.war $JETTY_FOLDER/webapps/ |
| 38 | ADD --chown=onap:onap catalog-fe-*.war $JETTY_FOLDER/webapps/ |
| 39 | COPY --chown=onap:onap startup.sh $JETTY_FOLDER |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 40 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 41 | RUN chmod 770 $JETTY_FOLDER/startup.sh |
Michael Lando | 9dd269d | 2017-02-20 01:04:22 +0200 | [diff] [blame] | 42 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 43 | ENTRYPOINT [ "sh", "-c", "${JETTY_HOME}/startup.sh"] |