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/Dockerfile48
1 files changed, 46 insertions, 2 deletions
diff --git a/catalog-fe/sdc-frontend/Dockerfile b/catalog-fe/sdc-frontend/Dockerfile
index 9d4029c32a..3a2359c4ab 100644
--- a/catalog-fe/sdc-frontend/Dockerfile
+++ b/catalog-fe/sdc-frontend/Dockerfile
@@ -1,4 +1,48 @@
-FROM onap/base_sdc-jetty:1.7.0
+FROM jetty:9.4.31-jre11-slim
+
+USER root
+
+# Install Chef
+RUN set -ex && \
+ apt-get update -y && \
+ apt-get install -y \
+ jq \
+ curl \
+ curl \
+ vim \
+ make \
+ gcc \
+ ruby \
+ ruby-dev \
+ libffi-dev \
+ libxml2-dev && \
+ gem install \
+ chef:13.8.5 \
+ berkshelf:6.3.1 \
+ io-console:0.4.6 \
+ etc webrick \
+ --no-document && \
+ gem cleanup && \
+ apt-get update -y && \
+ apt-get install -y binutils jq && \
+ apt-get clean
+
+# Replace Jetty user ID
+ENV USER_JETTY="jetty"
+ENV GROUP_JETTY="jetty"
+ENV UID_JETTY="352070"
+ENV GID_JETTY="35953"
+
+# 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
+
+USER jetty
RUN mkdir -p ${JETTY_BASE}/config/catalog-fe
@@ -14,4 +58,4 @@ COPY --chown=jetty:jetty startup.sh ${JETTY_BASE}
RUN chmod 770 ${JETTY_BASE}/startup.sh
-ENTRYPOINT ${JETTY_BASE}/startup.sh
+ENTRYPOINT [ "sh", "-c", "${JETTY_BASE}/startup.sh"] \ No newline at end of file