anchor.diff:  	&& dnf --nodocs install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \
   	&& if [ -z "${NAP_MODULES##*waf*}" ]; then \
   	curl -fsSL https://cs.nginx.com/static/files/app-protect-8.repo > /etc/yum.repos.d/app-protect-8.repo; \
  -	dnf --nodocs install -y app-protect-${NGINX_PLUS_VERSION#r}* app-protect-attack-signatures app-protect-threat-campaigns; \
  +	sed -i "0,/centos/s;;${NGINX_PLUS_VERSION}/centos;" /etc/yum.repos.d/app-protect-8.repo; \
  +	dnf --nodocs install -y app-protect app-protect-attack-signatures app-protect-threat-campaigns; \
   	fi \
   	&& if [ -z "${NAP_MODULES##*dos*}" ]; then \
   	curl -fsSL https://cs.nginx.com/static/files/app-protect-dos-8.repo > /etc/yum.repos.d/app-protect-dos-8.repo; \
  -	dnf --nodocs install -y app-protect-dos-${NGINX_PLUS_VERSION#r}*; \
  +	sed -i "0,/centos/s;;${NGINX_PLUS_VERSION}/centos;" /etc/yum.repos.d/app-protect-dos-8.repo; \
  +	dnf --nodocs install -y app-protect-dos; \
   	fi \
   	&& rm /etc/yum.repos.d/app-protect*.repo \
   	&& subscription-manager unregister \
  
positive.code: 	--mount=type=secret,id=nginx-repo.key,dst=/etc/apk/cert.key,mode=0644 \
  	--mount=type=bind,from=alpine-opentracing-lib,target=/tmp/ot/ \
  	wget -nv -O /etc/apk/keys/nginx_signing.rsa.pub https://cs.nginx.com/static/keys/nginx_signing.rsa.pub \
  	&& printf "%s\n" "https://pkgs.nginx.com/plus/alpine/v$(grep -E -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
  	&& apk add --no-cache libcap nginx-plus~${NGINX_PLUS_VERSION#r} nginx-plus-module-njs~${NGINX_PLUS_VERSION#r} nginx-plus-module-opentracing~${NGINX_PLUS_VERSION#r} libcurl \
  	&& cp -av /tmp/ot/usr/local/lib/libjaegertracing*so* /tmp/ot/usr/local/lib/libzipkin*so* /tmp/ot/usr/local/lib/libdd*so* /tmp/ot/usr/local/lib/libyaml*so* /usr/local/lib/ \
  	&& ldconfig /usr/local/lib/
  
  
negative.code: 	--mount=type=secret,id=nginx-repo.key,dst=/etc/ssl/nginx/nginx-repo.key,mode=0644 \
  	rpm --import https://cs.nginx.com/static/keys/nginx_signing.key \
  	&& curl -fsSL "https://cs.nginx.com/static/files/nginx-plus-$(grep -E -o '[0-9]+\.[0-9]+' /etc/redhat-release | cut -d"." -f1).repo" | tr 0 1 > /etc/yum.repos.d/nginx-plus.repo \
  	&& sed -i "0,/centos/s;;${NGINX_PLUS_VERSION}/centos;" /etc/yum.repos.d/nginx-plus.repo \
  	&& dnf --nodocs install -y nginx-plus nginx-plus-module-njs
  
  
  ############################################# Base image for UBI with NGINX Plus and App Protect WAF/DoS #############################################
  