blob: 091c5a36d3ef421afd4adcfc64151a1159fcf241 [file] [log] [blame]
vasraz36edaac2023-06-06 17:12:59 +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 \
eschcam30a2a7f2023-05-10 13:49:55 +010010 wget \
sebdetdf353be2020-09-21 22:13:05 +020011 build-base \
sebdet30670ac2020-08-04 14:16:00 +020012 ruby \
13 ruby-dev \
14 libffi-dev \
15 libxml2-dev && \
vasraz36edaac2023-06-06 17:12:59 +010016 gem update --system --no-document && \
17 gem install --no-update-sources public_suffix:4.0.7 multipart-post:2.2.0 etc:1.3.0 bundler:2.3.26 chef:13.8.5 berkshelf:6.3.1 io-console:0.4.6 webrick --no-document && \
sebdet30670ac2020-08-04 14:16:00 +020018 gem cleanup && \
sebdetdf353be2020-09-21 22:13:05 +020019 apk update
sebdet30670ac2020-08-04 14:16:00 +020020
sebdetdf353be2020-09-21 22:13:05 +020021ENV JETTY_HOME=$JETTY_FOLDER
22ENV JETTY_BASE=$JETTY_FOLDER
23ENV JETTY_USER=onap
24ENV JETTY_GROUP=onap
sebdet30670ac2020-08-04 14:16:00 +020025
sebdetdf353be2020-09-21 22:13:05 +020026RUN mkdir $JETTY_FOLDER && chown onap:onap $JETTY_FOLDER
sebdet30670ac2020-08-04 14:16:00 +020027
sebdetdf353be2020-09-21 22:13:05 +020028USER onap
Tal Gitelmanfa222902017-08-16 13:44:31 +030029
sebdetdf353be2020-09-21 22:13:05 +020030#Download jetty
vasraz36edaac2023-06-06 17:12:59 +010031RUN wget -q 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 && \
32 tar xz -C $JETTY_FOLDER -f $JETTY_FOLDER/jetty.tar.gz --strip 1 && \
sebdetdf353be2020-09-21 22:13:05 +020033 rm -rf $JETTY_FOLDER/jetty.tar.gz
34RUN sed -i 's/"jetty"/"onap"/g' $JETTY_FOLDER/etc/jetty-setuid.xml
Tal Gitelmanfa222902017-08-16 13:44:31 +030035
sebdetdf353be2020-09-21 22:13:05 +020036COPY --chown=onap:onap chef-solo $JETTY_FOLDER/chef-solo/
37COPY --chown=onap:onap chef-repo/cookbooks $JETTY_FOLDER/chef-solo/cookbooks/
38ADD --chown=onap:onap WSSimulator*.war $JETTY_FOLDER/webapps/
39COPY --chown=onap:onap startup.sh $JETTY_FOLDER/
Tal Gitelmanfa222902017-08-16 13:44:31 +030040
sebdetdf353be2020-09-21 22:13:05 +020041RUN chmod 770 $JETTY_FOLDER/startup.sh
Michael Landob35130e2017-09-27 19:31:12 +030042
sebdetdf353be2020-09-21 22:13:05 +020043ENTRYPOINT [ "sh", "-c", "${JETTY_HOME}/startup.sh"]