blob: c3f3a757acdb8383e3f2e286abc447b4fe0c85f1 [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 \
sebdetdf353be2020-09-21 22:13:05 +020014 libxml2-dev \
15 libressl-dev && \
sebdet30670ac2020-08-04 14:16:00 +020016 gem install \
17 chef:13.8.5 \
18 berkshelf:6.3.1 \
19 io-console:0.4.6 \
20 etc webrick \
21 --no-document && \
22 gem cleanup && \
sebdetdf353be2020-09-21 22:13:05 +020023 apk update
sebdet30670ac2020-08-04 14:16:00 +020024
sebdetdf353be2020-09-21 22:13:05 +020025ENV JETTY_HOME=$JETTY_FOLDER
26ENV JETTY_BASE=$JETTY_FOLDER
27ENV JETTY_USER=onap
28ENV JETTY_GROUP=onap
sebdet30670ac2020-08-04 14:16:00 +020029
sebdetdf353be2020-09-21 22:13:05 +020030RUN mkdir $JETTY_FOLDER && chown onap:onap $JETTY_FOLDER
sebdet30670ac2020-08-04 14:16:00 +020031
sebdetdf353be2020-09-21 22:13:05 +020032USER onap
Avi Zivc175a0d2018-03-15 13:21:44 +020033
sebdetdf353be2020-09-21 22:13:05 +020034#Download jetty
35RUN 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 && \
36 tar xvz -C $JETTY_FOLDER -f $JETTY_FOLDER/jetty.tar.gz --strip 1 && \
37 rm -rf $JETTY_FOLDER/jetty.tar.gz
38RUN sed -i 's/"jetty"/"onap"/g' $JETTY_FOLDER/etc/jetty-setuid.xml
Avi Zivc175a0d2018-03-15 13:21:44 +020039
Avi Zivc175a0d2018-03-15 13:21:44 +020040
sebdetdf353be2020-09-21 22:13:05 +020041COPY --chown=onap:onap chef-solo $JETTY_FOLDER/chef-solo/
42COPY --chown=onap:onap chef-repo/cookbooks $JETTY_FOLDER/chef-solo/cookbooks/
43ADD --chown=onap:onap onboarding-be-*.war $JETTY_FOLDER/webapps/
44ADD --chown=onap:onap api-docs.war $JETTY_FOLDER/webapps/
45COPY --chown=onap:onap startup.sh $JETTY_FOLDER/
46
47RUN chmod 770 $JETTY_FOLDER/startup.sh
48
49ENTRYPOINT [ "sh", "-c", "${JETTY_HOME}/startup.sh"]