blob: 66092e0254e2a52208d935502202177cd1d02d71 [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 && \
vasraz101e0a82022-06-09 19:36:13 +010015 gem install multipart-post -v 2.2.0 --no-document && \
vasraz987fc742021-11-29 17:42:02 +000016 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 +020017 gem cleanup && \
sebdetdf353be2020-09-21 22:13:05 +020018 apk update
sebdet30670ac2020-08-04 14:16:00 +020019
sebdetdf353be2020-09-21 22:13:05 +020020ENV JETTY_HOME=$JETTY_FOLDER
21ENV JETTY_BASE=$JETTY_FOLDER
22ENV JETTY_USER=onap
23ENV JETTY_GROUP=onap
sebdet30670ac2020-08-04 14:16:00 +020024
sebdetdf353be2020-09-21 22:13:05 +020025RUN mkdir $JETTY_FOLDER && chown onap:onap $JETTY_FOLDER
sebdet30670ac2020-08-04 14:16:00 +020026
sebdetdf353be2020-09-21 22:13:05 +020027USER onap
Tal Gitelmanfa222902017-08-16 13:44:31 +030028
sebdetdf353be2020-09-21 22:13:05 +020029#Download jetty
vasraz584dfd72022-03-03 11:38:39 +000030RUN wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/${jetty-distribution.version}/jetty-distribution-${jetty-distribution.version}.tar.gz -O $JETTY_FOLDER/jetty.tar.gz && \
sebdetdf353be2020-09-21 22:13:05 +020031 tar xvz -C $JETTY_FOLDER -f $JETTY_FOLDER/jetty.tar.gz --strip 1 && \
32 rm -rf $JETTY_FOLDER/jetty.tar.gz
33RUN sed -i 's/"jetty"/"onap"/g' $JETTY_FOLDER/etc/jetty-setuid.xml
Tal Gitelmanfa222902017-08-16 13:44:31 +030034
sebdetdf353be2020-09-21 22:13:05 +020035COPY --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 WSSimulator*.war $JETTY_FOLDER/webapps/
38COPY --chown=onap:onap startup.sh $JETTY_FOLDER/
Tal Gitelmanfa222902017-08-16 13:44:31 +030039
sebdetdf353be2020-09-21 22:13:05 +020040RUN chmod 770 $JETTY_FOLDER/startup.sh
Michael Landob35130e2017-09-27 19:31:12 +030041
sebdetdf353be2020-09-21 22:13:05 +020042ENTRYPOINT [ "sh", "-c", "${JETTY_HOME}/startup.sh"]