@@ -6,7 +6,7 @@ ARG NAP_WAF=false
6
6
7
7
# Initial packages setup
8
8
RUN apt-get -y update \
9
- && apt-get -y install -y apt-transport-https lsb-release ca-certificates wget gnupg2 curl \
9
+ && apt-get -y install apt-transport-https lsb-release ca-certificates wget gnupg2 curl debian-archive-keyring \
10
10
# NGINX Instance Manager agent setup
11
11
&& mkdir -p /deployment /etc/ssl/nginx \
12
12
# Agent installation
@@ -23,17 +23,15 @@ RUN --mount=type=secret,id=nginx-crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644
23
23
# Startup script
24
24
&& chmod +x /deployment/start.sh && touch /.dockerenv \
25
25
# Install prerequisite packages:
26
- && apt-get -y update \
27
- && apt-get -y install debian-archive-keyring \
28
- && wget -qO - https://cs.nginx.com/static/keys/nginx_signing.key | gpg --dearmor | tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null \
29
- && printf "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://pkgs.nginx.com/plus/debian `lsb_release -cs` nginx-plus\n " | tee /etc/apt/sources.list.d/nginx-plus.list \
26
+ && wget -qO - https://cs.nginx.com/static/keys/nginx_signing.key | gpg --dearmor > /usr/share/keyrings/nginx-archive-keyring.gpg \
27
+ && printf "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://pkgs.nginx.com/plus/debian `lsb_release -cs` nginx-plus\n " > /etc/apt/sources.list.d/nginx-plus.list \
30
28
&& wget -P /etc/apt/apt.conf.d https://cs.nginx.com/static/files/90pkgs-nginx \
31
29
&& apt-get -y update \
32
30
&& apt-get -y install nginx-plus nginx-plus-module-njs nginx-plus-module-prometheus \
33
31
34
32
# Optional NGINX App Protect WAF
35
33
&& if [ "$NAP_WAF" = "true" ] ; then \
36
- wget -qO - https://cs.nginx.com/static/keys/app-protect-security-updates.key | gpg --dearmor | tee /usr/share/keyrings/app-protect-security-updates.gpg >/dev/null \
34
+ wget -qO - https://cs.nginx.com/static/keys/app-protect-security-updates.key | gpg --dearmor > /usr/share/keyrings/app-protect-security-updates.gpg \
37
35
&& printf "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://pkgs.nginx.com/app-protect/debian `lsb_release -cs` nginx-plus\n " > /etc/apt/sources.list.d/nginx-app-protect.list \
38
36
&& printf "deb [signed-by=/usr/share/keyrings/app-protect-security-updates.gpg] https://pkgs.nginx.com/app-protect-security-updates/debian `lsb_release -cs` nginx-plus\n " >> /etc/apt/sources.list.d/nginx-app-protect.list \
39
37
&& apt-get -y update \
@@ -42,12 +40,12 @@ RUN --mount=type=secret,id=nginx-crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644
42
40
# Optional API Connectivity Manager DevPortal
43
41
# https://docs.nginx.com/nginx-management-suite/admin-guides/installation/on-prem/install-guide/
44
42
&& if [ "$DEVPORTAL" = "true" ] ; then \
45
- printf "deb https://pkgs.nginx.com/nms/debian `lsb_release -cs` nginx-plus\n " | tee /etc/apt/sources.list.d/nms.list \
43
+ printf "deb https://pkgs.nginx.com/nms/debian `lsb_release -cs` nginx-plus\n " > /etc/apt/sources.list.d/nms.list \
46
44
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABF5BD827BD9BF62 \
47
45
&& apt-get -y update \
48
46
&& apt-get -y install nginx-devportal nginx-devportal-ui \
49
- && echo 'DB_TYPE="sqlite"' | tee -a /etc/nginx-devportal/devportal.conf \
50
- && echo 'DB_PATH="/var/lib/nginx-devportal"' | tee -a /etc/nginx-devportal/devportal.conf; fi \
47
+ && echo 'DB_TYPE="sqlite"' >> /etc/nginx-devportal/devportal.conf \
48
+ && echo 'DB_PATH="/var/lib/nginx-devportal"' >> /etc/nginx-devportal/devportal.conf; fi \
51
49
52
50
# Forward request logs to Docker log collector
53
51
&& ln -sf /dev/stdout /var/log/nginx/access.log \
0 commit comments