blob: 31af19e8bef2f7d4990dd7d6c0bd801b5e2a4ffd [file] [log] [blame]
sebdetdf353be2020-09-21 22:13:05 +02001FROM onap/integration-java11:8.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 && \
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 && \
sebdetdf353be2020-09-21 22:13:05 +020022 apk update
sebdet30670ac2020-08-04 14:16:00 +020023
sebdetdf353be2020-09-21 22:13:05 +020024ENV JETTY_HOME=$JETTY_FOLDER
25ENV JETTY_BASE=$JETTY_FOLDER
26ENV JETTY_USER=onap
27ENV JETTY_GROUP=onap
sebdet30670ac2020-08-04 14:16:00 +020028
sebdetdf353be2020-09-21 22:13:05 +020029RUN mkdir $JETTY_FOLDER && chown onap:onap $JETTY_FOLDER
sebdet30670ac2020-08-04 14:16:00 +020030
sebdetdf353be2020-09-21 22:13:05 +020031USER onap
Tal Gitelmanfa222902017-08-16 13:44:31 +030032
sebdetdf353be2020-09-21 22:13:05 +020033#Download jetty
34RUN 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
37RUN sed -i 's/"jetty"/"onap"/g' $JETTY_FOLDER/etc/jetty-setuid.xml
Tal Gitelmanfa222902017-08-16 13:44:31 +030038
sebdetdf353be2020-09-21 22:13:05 +020039COPY --chown=onap:onap chef-solo $JETTY_FOLDER/chef-solo/
40COPY --chown=onap:onap chef-repo/cookbooks $JETTY_FOLDER/chef-solo/cookbooks/
41ADD --chown=onap:onap WSSimulator*.war $JETTY_FOLDER/webapps/
42COPY --chown=onap:onap startup.sh $JETTY_FOLDER/
Tal Gitelmanfa222902017-08-16 13:44:31 +030043
sebdetdf353be2020-09-21 22:13:05 +020044RUN chmod 770 $JETTY_FOLDER/startup.sh
Michael Landob35130e2017-09-27 19:31:12 +030045
sebdetdf353be2020-09-21 22:13:05 +020046ENTRYPOINT [ "sh", "-c", "${JETTY_HOME}/startup.sh"]