sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame^] | 1 | FROM onap/integration-java11:8.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 && \ |
| 15 | gem install \ |
| 16 | chef:13.8.5 \ |
| 17 | berkshelf:6.3.1 \ |
| 18 | io-console:0.4.6 \ |
| 19 | etc webrick \ |
| 20 | --no-document && \ |
| 21 | gem cleanup && \ |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame^] | 22 | apk update |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 23 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame^] | 24 | ENV JETTY_HOME=$JETTY_FOLDER |
| 25 | ENV JETTY_BASE=$JETTY_FOLDER |
| 26 | ENV JETTY_USER=onap |
| 27 | ENV JETTY_GROUP=onap |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 28 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame^] | 29 | RUN mkdir $JETTY_FOLDER && chown onap:onap $JETTY_FOLDER |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 30 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame^] | 31 | USER onap |
Tal Gitelman | fa22290 | 2017-08-16 13:44:31 +0300 | [diff] [blame] | 32 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame^] | 33 | #Download jetty |
| 34 | RUN wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.4.31.v20200723/jetty-distribution-9.4.31.v20200723.tar.gz -O $JETTY_FOLDER/jetty.tar.gz && \ |
| 35 | tar xvz -C $JETTY_FOLDER -f $JETTY_FOLDER/jetty.tar.gz --strip 1 && \ |
| 36 | rm -rf $JETTY_FOLDER/jetty.tar.gz |
| 37 | RUN sed -i 's/"jetty"/"onap"/g' $JETTY_FOLDER/etc/jetty-setuid.xml |
Tal Gitelman | fa22290 | 2017-08-16 13:44:31 +0300 | [diff] [blame] | 38 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame^] | 39 | COPY --chown=onap:onap chef-solo $JETTY_FOLDER/chef-solo/ |
| 40 | COPY --chown=onap:onap chef-repo/cookbooks $JETTY_FOLDER/chef-solo/cookbooks/ |
| 41 | ADD --chown=onap:onap WSSimulator*.war $JETTY_FOLDER/webapps/ |
| 42 | COPY --chown=onap:onap startup.sh $JETTY_FOLDER/ |
Tal Gitelman | fa22290 | 2017-08-16 13:44:31 +0300 | [diff] [blame] | 43 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame^] | 44 | RUN chmod 770 $JETTY_FOLDER/startup.sh |
Michael Lando | b35130e | 2017-09-27 19:31:12 +0300 | [diff] [blame] | 45 | |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame^] | 46 | ENTRYPOINT [ "sh", "-c", "${JETTY_HOME}/startup.sh"] |