Skip to content

Commit fdc31b6

Browse files
pleshakovRulox
authored andcommitted
Change how App Protect is installed
* In addition to installing app-protect package, install 4 packages: nginx-plus-module-appprotect, app-protect-plugin, app-protect-engine, app-protect-compiler. This is necessary to ensure the version of each package in the App Protect Dockerfiles, which will prevent possible errors of unmet dependencies during the image building. * Update App Protect packages to their latest versions. * Add rhel_license (required by DockerfileWithAppProtectForPlusForOpenShift) to .gitignore.
1 parent 538aa05 commit fdc31b6

File tree

3 files changed

+25
-6
lines changed

3 files changed

+25
-6
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ cmd/nginx-ingress/nginx-ingress
3333
*.crt
3434
*.key
3535

36+
# RHEL license
37+
rhel_license
38+
3639
# Visual Studio Code settings
3740
.vscode
3841

build/appprotect/DockerfileWithAppProtectForPlus

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ FROM debian:stretch-slim as base
44

55
LABEL maintainer="NGINX Docker Maintainers <[email protected]>"
66

7-
ENV APPPROTECT_VERSION 22+3.74.0-1~stretch
8-
ENV APPPROTECT_SIG_VERSION 2020.06.18-1~stretch
7+
ENV APPPROTECT_MODULE_VERSION 22+3.90.2-1~stretch
8+
ENV APPPROTECT_PLUGIN_VERSION 3.90.2-1~stretch
9+
ENV APPPROTECT_ENGINE_VERSION 4.1.1-1~stretch
10+
ENV APPPROTECT_COMPILER_VERSION 4.1.1-1~stretch
11+
ENV APPPROTECT_SIG_VERSION 2020.07.17-1~stretch
912
ENV NGINX_PLUS_VERSION 22-1~stretch
1013
ENV NGINX_PLUS_RELEASE R22
1114
ARG IC_VERSION
@@ -46,7 +49,12 @@ RUN set -x \
4649
&& echo "Acquire::https::app-protect-sigs.nginx.com::Verify-Host \"true\";" >> /etc/apt/apt.conf.d/90app-protect-sigs \
4750
&& echo "Acquire::https::app-protect-sigs.nginx.com::SslCert \"/etc/ssl/nginx/nginx-repo.crt\";" >> /etc/apt/apt.conf.d/90app-protect-sigs \
4851
&& echo "Acquire::https::app-protect-sigs.nginx.com::SslKey \"/etc/ssl/nginx/nginx-repo.key\";" >> /etc/apt/apt.conf.d/90app-protect-sigs \
49-
&& apt-get update && apt-get install -y nginx-plus=$NGINX_PLUS_VERSION app-protect=$APPPROTECT_VERSION \
52+
&& apt-get update && apt-get install -y nginx-plus=$NGINX_PLUS_VERSION \
53+
nginx-plus-module-appprotect=$APPPROTECT_MODULE_VERSION \
54+
app-protect-plugin=$APPPROTECT_PLUGIN_VERSION \
55+
app-protect-engine=$APPPROTECT_ENGINE_VERSION \
56+
app-protect-compiler=$APPPROTECT_COMPILER_VERSION \
57+
app-protect=$APPPROTECT_MODULE_VERSION \
5058
&& apt-get install -y app-protect-attack-signatures${APPPROTECT_SIG_VERSION:+=$APPPROTECT_SIG_VERSION} \
5159
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx \
5260
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx-debug \

build/appprotect/DockerfileWithAppProtectForPlusForOpenShift

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ LABEL name="NGINX Ingress Controller" \
99
maintainer="NGINX Docker Maintainers <[email protected]>" \
1010
vendor="NGINX Inc <[email protected]>"
1111

12+
ENV APPPROTECT_MODULE_VERSION 22+3.90.2-1.el7.ngx
13+
ENV APPPROTECT_PLUGIN_VERSION 3.90.2-1.el7.ngx
14+
ENV APPPROTECT_ENGINE_VERSION 4.1.1-1.el7.ngx
15+
ENV APPPROTECT_COMPILER_VERSION 4.1.1-1.el7.ngx
16+
ENV APPPROTECT_SIG_VERSION 2020.07.17-1.el7.ngx
1217
ENV NGINX_PLUS_VERSION 22-1.el7.ngx
13-
ENV APPPROTECT_VERSION 22+3.74.0-1.el7.ngx
14-
ENV APPPROTECT_SIG_VERSION 2020.07.06-1.el7.ngx
1518
ARG IC_VERSION
1619

1720
# Download certificate and key from the customer portal (https://cs.nginx.com)
@@ -51,7 +54,12 @@ RUN set -x \
5154
&& yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional rhel-7-server-optional-rpms \
5255
&& rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
5356
&& yum clean all \
54-
&& yum install -y nginx-plus-$NGINX_PLUS_VERSION app-protect-$APPPROTECT_VERSION \
57+
&& yum install -y nginx-plus-$NGINX_PLUS_VERSION \
58+
nginx-plus-module-appprotect-$APPPROTECT_MODULE_VERSION \
59+
app-protect-plugin-$APPPROTECT_PLUGIN_VERSION \
60+
app-protect-engine-$APPPROTECT_ENGINE_VERSION \
61+
app-protect-compiler-$APPPROTECT_COMPILER_VERSION \
62+
app-protect-$APPPROTECT_MODULE_VERSION \
5563
&& yum install -y app-protect-attack-signatures${APPPROTECT_SIG_VERSION:+-$APPPROTECT_SIG_VERSION} \
5664
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx \
5765
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx-debug \

0 commit comments

Comments
 (0)