anchor.diff:              -h /home/$CONTAINER_USER                    \
               -s /bin/bash                                \
               -S $CONTAINER_USER                      &&  \
  -    # Adding letsencrypt-ca to truststore
  -    export KEYSTORE=$JAVA_HOME/lib/security/cacerts && \
  -    wget -P /tmp/ https://letsencrypt.org/certs/letsencryptauthorityx1.der && \
  -    wget -P /tmp/ https://letsencrypt.org/certs/letsencryptauthorityx2.der && \
  -    wget -P /tmp/ https://letsencrypt.org/certs/lets-encrypt-x1-cross-signed.der && \
  -    wget -P /tmp/ https://letsencrypt.org/certs/lets-encrypt-x2-cross-signed.der && \
  -    wget -P /tmp/ https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.der && \
  -    wget -P /tmp/ https://letsencrypt.org/certs/lets-encrypt-x4-cross-signed.der && \
  -    keytool -trustcacerts -keystore $KEYSTORE -storepass changeit -noprompt -importcert -alias isrgrootx1 -file /tmp/letsencryptauthorityx1.der && \
  -    keytool -trustcacerts -keystore $KEYSTORE -storepass changeit -noprompt -importcert -alias isrgrootx2 -file /tmp/letsencryptauthorityx2.der && \
  -    keytool -trustcacerts -keystore $KEYSTORE -storepass changeit -noprompt -importcert -alias letsencryptauthorityx1 -file /tmp/lets-encrypt-x1-cross-signed.der && \
  -    keytool -trustcacerts -keystore $KEYSTORE -storepass changeit -noprompt -importcert -alias letsencryptauthorityx2 -file /tmp/lets-encrypt-x2-cross-signed.der && \
  -    keytool -trustcacerts -keystore $KEYSTORE -storepass changeit -noprompt -importcert -alias letsencryptauthorityx3 -file /tmp/lets-encrypt-x3-cross-signed.der && \
  -    keytool -trustcacerts -keystore $KEYSTORE -storepass changeit -noprompt -importcert -alias letsencryptauthorityx4 -file /tmp/lets-encrypt-x4-cross-signed.der && \
  -    # Install atlassian ssl tool
  -    wget -O /home/${JIRA_USER}/SSLPoke.class https://confluence.atlassian.com/kb/files/779355358/779355357/1/1441897666313/SSLPoke.class && \
  -    # Set permissions
       chown -R $JIRA_USER:$JIRA_GROUP ${JIRA_HOME}    &&  \
       chown -R $JIRA_USER:$JIRA_GROUP ${JIRA_INSTALL} &&  \
       chown -R $JIRA_USER:$JIRA_GROUP ${JIRA_SCRIPTS} &&  \
       chown -R $JIRA_USER:$JIRA_GROUP /home/${JIRA_USER} &&  \
  -    # Install dockerize
       wget -O /tmp/dockerize.tar.gz https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz && \
       tar -C /usr/local/bin -xzvf /tmp/dockerize.tar.gz && \
       rm /tmp/dockerize.tar.gz && \
  -    # Remove obsolete packages
       apk del                                             \
         ca-certificates                                   \
         gzip                                              \
  
positive.code:     rm -rf /var/cache/apk/*                         &&  \
      rm -rf /tmp/*                                   &&  \
      rm -rf /var/log/*
  
  # Image Metadata
  LABEL com.blacklabelops.application.jira.version=$JIRA_PRODUCT-$JIRA_VERSION \
  
negative.code:     cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime && \
      echo "${TIMEZONE}" >/etc/timezone
  
  # install/setup keystore using host based letsencrypt CA (for growd sso)
  RUN export KEYSTORE=${JAVA_HOME}/lib/security/cacerts && \
      wget -q -O /SSLPoke.class https://confluence.atlassian.com/kb/files/779355358/779355357/1/1441897666313/SSLPoke.class && \
      wget -q -P /tmp/ https://letsencrypt.org/certs/letsencryptauthorityx1.der && \
      wget -q -P /tmp/ https://letsencrypt.org/certs/letsencryptauthorityx2.der && \
      wget -q -P /tmp/ https://letsencrypt.org/certs/lets-encrypt-x1-cross-signed.der && \
      wget -q -P /tmp/ https://letsencrypt.org/certs/lets-encrypt-x2-cross-signed.der && \
      wget -q -P /tmp/ https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.der && \
      wget -q -P /tmp/ https://letsencrypt.org/certs/lets-encrypt-x4-cross-signed.der && \
      keytool -trustcacerts -keystore ${KEYSTORE} -storepass changeit -noprompt -importcert -alias isrgrootx1 -file /tmp/letsencryptauthorityx1.der && \
      keytool -trustcacerts -keystore ${KEYSTORE} -storepass changeit -noprompt -importcert -alias isrgrootx2 -file /tmp/letsencryptauthorityx2.der && \
      keytool -trustcacerts -keystore ${KEYSTORE} -storepass changeit -noprompt -importcert -alias letsencryptauthorityx1 -file /tmp/lets-encrypt-x1-cross-signed.der && \
      keytool -trustcacerts -keystore ${KEYSTORE} -storepass changeit -noprompt -importcert -alias letsencryptauthorityx2 -file /tmp/lets-encrypt-x2-cross-signed.der && \
      keytool -trustcacerts -keystore ${KEYSTORE} -storepass changeit -noprompt -importcert -alias letsencryptauthorityx3 -file /tmp/lets-encrypt-x3-cross-signed.der && \
      keytool -trustcacerts -keystore ${KEYSTORE} -storepass changeit -noprompt -importcert -alias letsencryptauthorityx4 -file /tmp/lets-encrypt-x4-cross-signed.der
  
  # --
  # testblock_01_SOB
  # --
  RUN export JIRA_BIN=atlassian-${JIRA_PRODUCT}-${JIRA_VERSION}-x64.bin && \
      mkdir -p ${JIRA_HOME}                           &&  \
      mkdir -p ${JIRA_INSTALL}                        &&  \
      wget -O /tmp/jira.bin https://www.atlassian.com/software/jira/downloads/binary/${JIRA_BIN} && \
      chmod +x /tmp/jira.bin                          &&  \
      /tmp/jira.bin -q -varfile                           \
        ${JIRA_SCRIPTS}/response.varfile              &&  \
      # Install database drivers
      rm -f                                               \
        ${JIRA_INSTALL}/lib/mysql-connector-java*.jar &&  \
      wget -O /tmp/mysql-connector-java-${MYSQL_DRIVER_VERSION}.tar.gz                                              \
        http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-${MYSQL_DRIVER_VERSION}.tar.gz      &&  \
      tar xzf /tmp/mysql-connector-java-${MYSQL_DRIVER_VERSION}.tar.gz                                              \
        --directory=/tmp                                                                                        &&  \
      cp /tmp/mysql-connector-java-${MYSQL_DRIVER_VERSION}/mysql-connector-java-${MYSQL_DRIVER_VERSION}-bin.jar     \
        ${JIRA_INSTALL}/lib/mysql-connector-java-${MYSQL_DRIVER_VERSION}-bin.jar                                &&  \
      # Add user
      export CONTAINER_USER=jira                      &&  \
      export CONTAINER_UID=1000                       &&  \
      export CONTAINER_GROUP=jira                     &&  \
      export CONTAINER_GID=1000                       &&  \
  