|
| 1 | + |
| 2 | +#@follow_tag(registry.redhat.io/ubi8:latest) |
| 3 | +FROM registry.access.redhat.com/ubi8 |
| 4 | +ENV BUILD_VERSION=6.8.1 |
| 5 | +ENV SOURCE_GIT_COMMIT=${CI_ORIGIN_AGGREGATED_LOGGING_UPSTREAM_COMMIT:-} |
| 6 | +ENV SOURCE_GIT_URL=${CI_ORIGIN_AGGREGATED_LOGGING_UPSTREAM_URL:-} |
| 7 | + |
| 8 | +MAINTAINER OpenShift Development < [email protected]> |
| 9 | + |
| 10 | +EXPOSE 9200 |
| 11 | +EXPOSE 9300 |
| 12 | +USER 0 |
| 13 | + |
| 14 | +ARG ES_ARCHIVE_URL |
| 15 | +ARG PROMETHEUS_EXPORTER_URL |
| 16 | +ARG INGEST_PLUGIN_URL |
| 17 | +ARG OPENDISTRO_URL |
| 18 | +ARG OPENSHIFT_CI |
| 19 | + |
| 20 | + |
| 21 | +ENV ES_PATH_CONF=/etc/elasticsearch/ \ |
| 22 | + ES_HOME=/usr/share/elasticsearch \ |
| 23 | + ES_VER=6.8.1.redhat-00029 \ |
| 24 | + HOME=/opt/app-root/src \ |
| 25 | + INSTANCE_RAM=512G \ |
| 26 | + JAVA_VER=11 \ |
| 27 | + JAVA_HOME=/usr/lib/jvm/jre \ |
| 28 | + _JAVA_OPTIONS="-Dcom.redhat.fips=false" \ |
| 29 | + NODE_QUORUM=1 \ |
| 30 | + PROMETHEUS_EXPORTER_VER=6.8.1.2-redhat-00001 \ |
| 31 | + INGEST_PLUGIN_VER=6.8.1.0-redhat-00003 \ |
| 32 | + OPENDISTRO_VER=0.10.1.2-redhat-00019 \ |
| 33 | + PLUGIN_LOGLEVEL=INFO \ |
| 34 | + RECOVER_AFTER_NODES=1 \ |
| 35 | + RECOVER_EXPECTED_NODES=1 \ |
| 36 | + RECOVER_AFTER_TIME=5m \ |
| 37 | + DHE_TMP_KEY_SIZE=2048 \ |
| 38 | + RELEASE_STREAM=prod \ |
| 39 | + OPENSHIFT_CI=${OPENSHIFT_CI:-false} |
| 40 | + |
| 41 | + |
| 42 | +# COPY $REMOTE_SOURCE $REMOTE_SOURCE_DIR |
| 43 | +# WORKDIR $REMOTE_SOURCE_DIR/app/elasticsearch |
| 44 | + |
| 45 | +RUN packages="java-${JAVA_VER}-openjdk-headless \ |
| 46 | + python36 \ |
| 47 | + python3-pyyaml \ |
| 48 | + hostname \ |
| 49 | + openssl \ |
| 50 | + zip \ |
| 51 | + unzip" && \ |
| 52 | + yum install -y ${packages} && \ |
| 53 | + rpm -V ${packages} && \ |
| 54 | + alternatives --set python /usr/bin/python3 && \ |
| 55 | + yum clean all |
| 56 | + |
| 57 | +ARG MAVEN_REPO_URL=${MAVEN_REPO_URL:-file:///artifacts/} |
| 58 | +ENV upstream_code=${upstream_code:-"."} |
| 59 | + |
| 60 | +COPY ${upstream_code}/extra-jvm.options /var/tmp |
| 61 | +COPY ${upstream_code}/ci-env.sh /var/tmp |
| 62 | +COPY ${upstream_code}/install-es.sh /var/tmp |
| 63 | +COPY artifacts /artifacts |
| 64 | +RUN /var/tmp/install-es.sh && rm -rf /var/tmp/* |
| 65 | + |
| 66 | +COPY ${upstream_code}/sgconfig/ ${HOME}/sgconfig/ |
| 67 | +COPY ${upstream_code}/index_templates/ ${ES_HOME}/index_templates/ |
| 68 | +COPY ${upstream_code}/ingest_pipelines/ ${ES_HOME}/ingest_pipelines/ |
| 69 | +COPY ${upstream_code}/index_patterns/ ${ES_HOME}/index_patterns/ |
| 70 | +COPY ${upstream_code}/init/ ${ES_HOME}/init/ |
| 71 | +COPY ${upstream_code}/probe/ ${ES_HOME}/probe/ |
| 72 | +COPY ${upstream_code}/init.sh ${HOME}/ |
| 73 | +COPY ${upstream_code}/run.sh ${HOME}/ |
| 74 | +COPY ${upstream_code}/ci-env.sh ${HOME}/ |
| 75 | +COPY ${upstream_code}/install.sh ${HOME}/ |
| 76 | +COPY ${upstream_code}/utils/** /usr/local/bin/ |
| 77 | + |
| 78 | +RUN ${HOME}/install.sh && rm -rf /artifacts && \ |
| 79 | + mv ${ES_HOME}/lib/elasticsearch-${ES_VER}.jar ${ES_HOME}/lib/elasticsearch-$(echo $ES_VER | cut -d'.' -f1-3).jar |
| 80 | + |
| 81 | +WORKDIR ${HOME} |
| 82 | +USER 1000 |
| 83 | +CMD ["sh", "/opt/app-root/src/run.sh"] |
| 84 | + |
| 85 | +LABEL \ |
| 86 | + License="Apache-2.0" \ |
| 87 | + io.k8s.description="Elasticsearch container for EFK aggregated logging storage" \ |
| 88 | + io.k8s.display-name="Elasticsearch 6" \ |
| 89 | + io.openshift.tags="logging,elk,elasticsearch" \ |
| 90 | + vendor="Red Hat" \ |
| 91 | + name="openshift-logging/elasticsearch6-rhel8" \ |
| 92 | + com.redhat.component="logging-elasticsearch6-container" \ |
| 93 | + io.openshift.maintainer.product="OpenShift Container Platform" \ |
| 94 | + io.openshift.build.commit.id=${CI_ORIGIN_AGGREGATED_LOGGING_UPSTREAM_COMMIT} \ |
| 95 | + io.openshift.build.source-location=${CI_ORIGIN_AGGREGATED_LOGGING_UPSTREAM_URL} \ |
| 96 | + io.openshift.build.commit.url=${CI_ORIGIN_AGGREGATED_LOGGING_UPSTREAM_URL}/commit/${CI_ORIGIN_AGGREGATED_LOGGING_UPSTREAM_COMMIT} \ |
| 97 | + version=v6.8.1 |
0 commit comments