summaryrefslogtreecommitdiffstats
path: root/catalog-fe/sdc-frontend/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-fe/sdc-frontend/Dockerfile')
-rw-r--r--catalog-fe/sdc-frontend/Dockerfile63
1 files changed, 25 insertions, 38 deletions
diff --git a/catalog-fe/sdc-frontend/Dockerfile b/catalog-fe/sdc-frontend/Dockerfile
index 3a2359c4ab..65950cb0e1 100644
--- a/catalog-fe/sdc-frontend/Dockerfile
+++ b/catalog-fe/sdc-frontend/Dockerfile
@@ -1,17 +1,13 @@
-FROM jetty:9.4.31-jre11-slim
+FROM onap/integration-java11:8.0.0
USER root
+ARG JETTY_FOLDER=/app/jetty
# Install Chef
RUN set -ex && \
- apt-get update -y && \
- apt-get install -y \
- jq \
- curl \
- curl \
- vim \
- make \
- gcc \
+ apk update && \
+ apk add --no-cache \
+ build-base \
ruby \
ruby-dev \
libffi-dev \
@@ -23,39 +19,30 @@ RUN set -ex && \
etc webrick \
--no-document && \
gem cleanup && \
- apt-get update -y && \
- apt-get install -y binutils jq && \
- apt-get clean
+ apk update
-# Replace Jetty user ID
-ENV USER_JETTY="jetty"
-ENV GROUP_JETTY="jetty"
-ENV UID_JETTY="352070"
-ENV GID_JETTY="35953"
+ENV JETTY_HOME=$JETTY_FOLDER
+ENV JETTY_BASE=$JETTY_FOLDER
+ENV JETTY_USER=onap
+ENV JETTY_GROUP=onap
-# Remove user:
-RUN deluser ${USER_JETTY}
-#RUN delgroup ${GROUP_JETTY}
-RUN echo "${USER_JETTY}:x:${UID_JETTY}:${GID_JETTY}::/home/${USER_JETTY}:Linux User,,,:/home/jetty:/bin/false" >> /etc/passwd
-RUN echo "${GROUP_JETTY}:x:${GID_JETTY}:${USER_JETTY}" >> /etc/group
-RUN echo "${USER_JETTY}:!:17501:0:99999:7:::" >> /etc/shadow
-RUN mkdir /home/${USER_JETTY} && chown ${USER_JETTY}:${GROUP_JETTY} /home/${USER_JETTY}
-RUN chown -R jetty:jetty ${JETTY_BASE}/webapps /var/lib/jetty
+RUN mkdir $JETTY_FOLDER && chown onap:onap $JETTY_FOLDER
-USER jetty
+USER onap
-RUN mkdir -p ${JETTY_BASE}/config/catalog-fe
+#Download jetty
+RUN 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 && \
+ tar xvz -C $JETTY_FOLDER -f $JETTY_FOLDER/jetty.tar.gz --strip 1 && \
+ rm -rf $JETTY_FOLDER/jetty.tar.gz
+RUN sed -i 's/"jetty"/"onap"/g' $JETTY_FOLDER/etc/jetty-setuid.xml
-COPY --chown=jetty:jetty chef-solo ${JETTY_BASE}/chef-solo/
+RUN mkdir -p $JETTY_FOLDER/config/catalog-fe
+COPY --chown=onap:onap chef-solo $JETTY_FOLDER/chef-solo/
+COPY --chown=onap:onap chef-repo/cookbooks $JETTY_FOLDER/chef-solo/cookbooks/
+ADD --chown=onap:onap onboarding*.war $JETTY_FOLDER/webapps/
+ADD --chown=onap:onap catalog-fe-*.war $JETTY_FOLDER/webapps/
+COPY --chown=onap:onap startup.sh $JETTY_FOLDER
-COPY --chown=jetty:jetty chef-repo/cookbooks ${JETTY_BASE}/chef-solo/cookbooks/
+RUN chmod 770 $JETTY_FOLDER/startup.sh
-ADD --chown=jetty:jetty onboarding*.war ${JETTY_BASE}/webapps/
-
-ADD --chown=jetty:jetty catalog-fe-*.war ${JETTY_BASE}/webapps/
-
-COPY --chown=jetty:jetty startup.sh ${JETTY_BASE}
-
-RUN chmod 770 ${JETTY_BASE}/startup.sh
-
-ENTRYPOINT [ "sh", "-c", "${JETTY_BASE}/startup.sh"] \ No newline at end of file
+ENTRYPOINT [ "sh", "-c", "${JETTY_HOME}/startup.sh"] \ No newline at end of file