anchor.diff:  FROM centos:7
   
   ENV ELASTIC_CONTAINER true
  -ENV JAVA_HOME /opt/jdk-11.0.1
  +ENV JAVA_HOME /opt/jdk-12
   
  -COPY --from=builder /opt/jdk-11.0.1 /opt/jdk-11.0.1
  +COPY --from=builder /opt/jdk-12 /opt/jdk-12
   
   RUN yum update -y && \
       yum install -y nc unzip wget which && \
  
positive.code: 
  WORKDIR /usr/share/elasticsearch
  
  RUN cd /opt && curl --retry 8 -s -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.2.tar.gz && cd -
  
  RUN tar zxf /opt/elasticsearch-6.6.2.tar.gz --strip-components=1
  RUN elasticsearch-plugin install --batch ingest-geoip
  RUN elasticsearch-plugin install --batch ingest-user-agent
  RUN mkdir -p config data logs
  RUN chmod 0775 config data logs
  COPY config/elasticsearch.yml config/log4j2.properties config/
  
negative.code: FROM centos:7 AS builder
  
  ENV PATH /usr/share/elasticsearch/bin:$PATH
  ENV JAVA_HOME /opt/jdk-12
  
  RUN curl --retry 8 -s https://download.java.net/java/GA/jdk12/GPL/openjdk-12_linux-x64_bin.tar.gz | tar -C /opt -zxf -
  
  # Replace OpenJDK's built-in CA certificate keystore with the one from the OS
  # vendor. The latter is superior in several ways.
  # REF: https://github.com/elastic/elasticsearch-docker/issues/171
  RUN ln -sf /etc/pki/ca-trust/extracted/java/cacerts /opt/jdk-12/lib/security/cacerts
  
  RUN yum install -y unzip which
  
  