@@ -47,11 +47,10 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
47
47
&& apt-get install --no-install-recommends --no-install-suggests -y ca-certificates gnupg curl apt-transport-https libcap2-bin \
48
48
&& curl -sSL https://cs.nginx.com/static/keys/nginx_signing.key | gpg --dearmor > /etc/apt/trusted.gpg.d/nginx_signing.gpg \
49
49
&& curl -sSL -o /etc/apt/apt.conf.d/90pkgs-nginx https://cs.nginx.com/static/files/90pkgs-nginx \
50
- && printf "%s\n " "Acquire::https::pkgs.nginx.com::User-Agent \" k8s-ic-$IC_VERSION-apt\" ;" >> /etc/apt/apt.conf.d/90pkgs-nginx \
50
+ && printf "%s\n " "Acquire::https::pkgs.nginx.com::User-Agent \" k8s-ic-$IC_VERSION${BUILD_OS##debian-plus} -apt\" ;" >> /etc/apt/apt.conf.d/90pkgs-nginx \
51
51
&& printf "%s\n " "deb https://pkgs.nginx.com/plus/${NGINX_PLUS_VERSION^^}/debian buster nginx-plus" > /etc/apt/sources.list.d/nginx-plus.list \
52
52
&& apt-get update \
53
- && apt-get install --no-install-recommends --no-install-suggests -y \
54
- nginx-plus-${NGINX_PLUS_VERSION} nginx-plus-module-njs-${NGINX_PLUS_VERSION} \
53
+ && apt-get install --no-install-recommends --no-install-suggests -y nginx-plus nginx-plus-module-njs \
55
54
&& apt-get purge --auto-remove -y apt-transport-https gnupg curl \
56
55
&& rm -rf /var/lib/apt/lists/*
57
56
@@ -66,14 +65,11 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
66
65
apt-get update \
67
66
&& apt-get install --no-install-recommends --no-install-suggests -y gnupg curl apt-transport-https \
68
67
&& curl -sSL https://cs.nginx.com/static/keys/app-protect-security-updates.key | gpg --dearmor > /etc/apt/trusted.gpg.d/nginx_app_signing.gpg \
69
- && sed -i "s/$IC_VERSION/$IC_VERSION-nap/g" /etc/apt/apt.conf.d/90pkgs-nginx \
70
- && printf "%s\n " "deb https://pkgs.nginx.com/app-protect/debian buster nginx-plus" \
68
+ && printf "%s\n " "deb https://pkgs.nginx.com/app-protect/${NGINX_PLUS_VERSION^^}/debian buster nginx-plus" \
71
69
"deb https://pkgs.nginx.com/app-protect-security-updates/debian buster nginx-plus" > /etc/apt/sources.list.d/nginx-app-protect.list \
72
70
&& apt-get update \
73
- # searching apt-cache for the latest version of NAP package compatible with the $NGINX_PLUS_VERSION
74
- && module_version=$(apt-cache showpkg nginx-plus-module-appprotect | awk -v ver="nginx-plus-$NGINX_PLUS_VERSION" '{ if ($6 == ver) {print $1; exit}}' ) \
75
- && apt-get install --no-install-recommends --no-install-suggests -y nginx-plus-module-appprotect=${module_version} app-protect=${module_version} \
76
- && apt-get install --no-install-recommends --no-install-suggests -y app-protect-attack-signatures app-protect-threat-campaigns \
71
+ && apt-get install --no-install-recommends --no-install-suggests -y \
72
+ nginx-plus-module-appprotect app-protect app-protect-attack-signatures app-protect-threat-campaigns \
77
73
&& apt-get purge --auto-remove -y apt-transport-https gnupg curl \
78
74
&& rm -rf /var/lib/apt/lists/* \
79
75
&& rm /etc/apt/sources.list.d/nginx-app-protect.list
0 commit comments