diff --git a/Dockerfile b/Dockerfile index 182bd5cdf88ed3e23c4cbdf7e688ee4014ee4115..332efe8645cceda26c8606e3a26afb7f51d97c8d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,10 +9,9 @@ ARG BASE_TAG=8.2 FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} EXPOSE 5601 -#RUN yum update --disablerepo="*" --enablerepo="*ubi-8*" --setopt=tsflags=nodocs -y && yum install -y --disablerepo="*" --enablerepo="*ubi-8*" tar gzip fontconfig freetype shadow-utils && yum clean all - -RUN yum update --setopt=tsflags=nodocs -y && yum install -y tar gzip fontconfig freetype shadow-utils && yum clean all - +RUN yum update --setopt=tsflags=nodocs -y && \ + yum install -y tar gzip fontconfig freetype shadow-utils && \ + yum clean all RUN mkdir /usr/share/kibana WORKDIR /usr/share/kibana @@ -21,16 +20,11 @@ ARG TARBALL=kibana-7.8.0-linux-x86_64.tar.gz COPY --chown=1000:0 ${TARBALL} . -# Set gid to 0 for kibana and make group permission similar to that of user -# This is needed, for example, for Openshift Open: -# https://docs.openshift.org/latest/creating_images/guidelines.html -# and allows Kibana to run with an uid RUN tar --strip-components=1 -zxf ${TARBALL} && \ rm -rf ${TARBALL} && \ ln -s /usr/share/kibana /opt/kibana && \ chown -R 1000:0 . && \ - chmod -R g=u /usr/share/kibana && \ - find /usr/share/kibana -type d -exec chmod g+s {} \; + chmod -R g=u /usr/share/kibana COPY LICENSE /licenses/elastic-kibana @@ -50,9 +44,6 @@ COPY --chown=1000:0 config/kibana.yml /usr/share/kibana/config/kibana.yml # variables and translate them to Kibana CLI options. COPY --chown=1000:0 bin/kibana-docker /usr/local/bin/ -# Ensure gid 0 write permissions for OpenShift. -RUN chmod g+ws /usr/share/kibana && find /usr/share/kibana -gid 0 -and -not -perm /g+w -exec chmod g+w {} \; - # Remove the suid bit everywhere to mitigate "Stack Clash" RUN find / -xdev -perm -4000 -exec chmod u-s {} +