anchor.diff:          software-properties-common \
           gosu \
       && \
  -    apt-get clean && \
  -    rm -rf /var/lib/apt/lists/* /tmp/*
  +    rm -rf /tmp/*
   
   # Install yq, needed for init scripts
   RUN add-apt-repository --no-update -y ppa:rmescandon/yq
  -RUN apt-get update && \
  +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
  +    --mount=type=cache,target=/var/lib/apt,sharing=locked \
  +    apt-get update && \
       apt-get install --no-install-recommends -y \
           yq \
       && \
  -    apt-get clean && \
  -    rm -rf /var/lib/apt/lists/* /tmp/*
  +    rm -rf /tmp/*
   
   # Install JDK/JRE
   COPY java-excludes.dpkg.cfg /etc/dpkg/dpkg.cfg.d/java-excludes
   ADD https://packages.adoptium.net/artifactory/api/gpg/key/public /usr/share/keyrings/adoptium.asc
   ADD https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public /usr/share/keyrings/adoptopenjdk.asc
  -RUN gpg --dearmor -o /usr/share/keyrings/adoptium.gpg /usr/share/keyrings/adoptium.asc && \
  +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
  +    --mount=type=cache,target=/var/lib/apt,sharing=locked \
  +    gpg --dearmor -o /usr/share/keyrings/adoptium.gpg /usr/share/keyrings/adoptium.asc && \
       gpg --dearmor -o /usr/share/keyrings/adoptopenjdk.gpg /usr/share/keyrings/adoptopenjdk.asc && \
       echo "deb [signed-by=/usr/share/keyrings/adoptium.gpg] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list && \
       echo "deb [signed-by=/usr/share/keyrings/adoptopenjdk.gpg] https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptopenjdk.list && \
  
positive.code: #
  # Build Audit Stack for iRODS Monitoring via Audit Plugin
  #
  
negative.code: SHELL [ "/bin/bash", "-c" ]
  
  # not-logstash script and init script
  COPY --chmod=755 not-logstash/not-logstash.py /var/lib/irods-elk/bin/not-logstash
  COPY --chmod=755 not-logstash/not-logstash.init /etc/init.d/not-logstash
  
  WORKDIR /var/lib/irods-elk
  
  COPY --chmod=755 startup-script.sh /var/lib/irods-elk/startup-script.sh
  ENTRYPOINT ["/var/lib/irods-elk/startup-script.sh"]
  