blob: 005e5c9d2bb58ff567366f46432567c4ca5d0d11 [file] [log] [blame]
vasraz987fc742021-11-29 17:42:02 +00001FROM onap/integration-java11:9.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 \
14 libxml2-dev && \
vasraz987fc742021-11-29 17:42:02 +000015 gem install chef:13.8.5 berkshelf:6.3.1 io-console:0.4.6 etc webrick --no-document && \
sebdet30670ac2020-08-04 14:16:00 +020016 gem cleanup && \
sebdetdf353be2020-09-21 22:13:05 +020017 apk update
sebdet30670ac2020-08-04 14:16:00 +020018
sebdetdf353be2020-09-21 22:13:05 +020019ENV JETTY_HOME=$JETTY_FOLDER
20ENV JETTY_BASE=$JETTY_FOLDER
21ENV JETTY_USER=onap
22ENV JETTY_GROUP=onap
sebdet30670ac2020-08-04 14:16:00 +020023
sebdetdf353be2020-09-21 22:13:05 +020024RUN mkdir $JETTY_FOLDER && chown onap:onap $JETTY_FOLDER
sebdet30670ac2020-08-04 14:16:00 +020025
sebdetdf353be2020-09-21 22:13:05 +020026USER onap
Michael Lando9dd269d2017-02-20 01:04:22 +020027
sebdetdf353be2020-09-21 22:13:05 +020028#Download jetty
vasraz8b1002a2021-12-08 22:12:52 +000029RUN 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 && \
sebdetdf353be2020-09-21 22:13:05 +020030 tar xvz -C $JETTY_FOLDER -f $JETTY_FOLDER/jetty.tar.gz --strip 1 && \
31 rm -rf $JETTY_FOLDER/jetty.tar.gz
32RUN sed -i 's/"jetty"/"onap"/g' $JETTY_FOLDER/etc/jetty-setuid.xml
Michael Lando9dd269d2017-02-20 01:04:22 +020033
sebdetdf353be2020-09-21 22:13:05 +020034RUN mkdir -p $JETTY_FOLDER/config/catalog-fe
35COPY --chown=onap:onap chef-solo $JETTY_FOLDER/chef-solo/
36COPY --chown=onap:onap chef-repo/cookbooks $JETTY_FOLDER/chef-solo/cookbooks/
37ADD --chown=onap:onap onboarding*.war $JETTY_FOLDER/webapps/
38ADD --chown=onap:onap catalog-fe-*.war $JETTY_FOLDER/webapps/
39COPY --chown=onap:onap startup.sh $JETTY_FOLDER
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000040
sebdetdf353be2020-09-21 22:13:05 +020041RUN chmod 770 $JETTY_FOLDER/startup.sh
Michael Lando9dd269d2017-02-20 01:04:22 +020042
sebdetdf353be2020-09-21 22:13:05 +020043ENTRYPOINT [ "sh", "-c", "${JETTY_HOME}/startup.sh"]