anchor.diff:  	set -x \
   	&& apt-get update \
   	&& apt-get -y install ca-certificates \
  -    && DEBIAN_VERSION=$(awk -F '=' '/^VERSION_CODENAME=/ {print $2}' /etc/os-release) \
  +	&& DEBIAN_VERSION=$(awk -F '=' '/^VERSION_CODENAME=/ {print $2}' /etc/os-release) \
   	&& printf "%s\n" "deb https://pkgs.nginx.com/app-protect-dos/${NGINX_PLUS_VERSION^^}/debian ${DEBIAN_VERSION} nginx-plus" > /etc/apt/sources.list.d/nginx-app-protect-dos.list \
   	&& apt-get update \
   	&& apt-get -y install app-protect-dos \
  
positive.code: 	source /tmp/rhel_license \
  	&& subscription-manager register --org=${RHEL_ORGANIZATION} --activationkey=${RHEL_ACTIVATION_KEY} || true \
  	&& subscription-manager attach \
      && curl -sS https://cs.nginx.com/static/files/app-protect-dos-7.repo > /etc/yum.repos.d/app-protect-dos-7.repo \
      && yum clean all \
      && yum -y install epel-release \
      && yum -y install app-protect-dos-${NGINX_PLUS_VERSION#r}* \
      && rm /etc/yum.repos.d/app-protect-dos-7.repo \
      && subscription-manager unregister
  
  ############################################# Base images containing libs for Opentracing #############################################
  FROM opentracing/nginx-opentracing:nginx-1.21.4 as opentracing-lib
  
negative.code: 	source /tmp/rhel_license \
  	&& subscription-manager register --org=${RHEL_ORGANIZATION} --activationkey=${RHEL_ACTIVATION_KEY} || true \
  	&& subscription-manager attach \
  	&& subscription-manager repos --enable rhel-7-server-optional-rpms --enable rhel-7-server-extras-rpms \
  	&& curl -fsSL https://cs.nginx.com/static/files/app-protect-dos-7.repo > /etc/yum.repos.d/app-protect-dos-7.repo \
  	&& yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
  	&& yum install -y app-protect-dos-${NGINX_PLUS_VERSION#r}* \
  	&& rm /etc/yum.repos.d/app-protect-dos-7.repo \
  	&& subscription-manager unregister \
  	&& yum clean all && rm -rf /var/cache/yum
  
  
  ############################################# Base image for UBI with NGINX Plus, App Protect WAF and App Protect Dos #############################################
  FROM ubi-plus-nap as ubi-plus-nap-dos
  ARG NGINX_PLUS_VERSION
  
  