Skip to content

Commit c9291a4

Browse files
Dockerfile updated (#82)
* Added nginx-agent-docker * Changed base image to Debian bullseye * Update nginx-agent-docker/Dockerfile Thank you Co-authored-by: Luca Comellini <[email protected]> Signed-off-by: 65397 <[email protected]> * Update nginx-agent-docker/Dockerfile Co-authored-by: Luca Comellini <[email protected]> Signed-off-by: 65397 <[email protected]> * Update nginx-agent-docker/Dockerfile Co-authored-by: Luca Comellini <[email protected]> Signed-off-by: 65397 <[email protected]> * Update nginx-agent-docker/Dockerfile Co-authored-by: Luca Comellini <[email protected]> Signed-off-by: 65397 <[email protected]> * Dockerfile updated --------- Signed-off-by: 65397 <[email protected]> Co-authored-by: Luca Comellini <[email protected]>
1 parent 698b58e commit c9291a4

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

nginx-agent-docker/Dockerfile

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ARG NAP_WAF=false
66

77
# Initial packages setup
88
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 \
1010
# NGINX Instance Manager agent setup
1111
&& mkdir -p /deployment /etc/ssl/nginx \
1212
# Agent installation
@@ -23,17 +23,15 @@ RUN --mount=type=secret,id=nginx-crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644
2323
# Startup script
2424
&& chmod +x /deployment/start.sh && touch /.dockerenv \
2525
# 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 \
3028
&& wget -P /etc/apt/apt.conf.d https://cs.nginx.com/static/files/90pkgs-nginx \
3129
&& apt-get -y update \
3230
&& apt-get -y install nginx-plus nginx-plus-module-njs nginx-plus-module-prometheus \
3331

3432
# Optional NGINX App Protect WAF
3533
&& 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 \
3735
&& 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 \
3836
&& 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 \
3937
&& apt-get -y update \
@@ -42,12 +40,12 @@ RUN --mount=type=secret,id=nginx-crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644
4240
# Optional API Connectivity Manager DevPortal
4341
# https://docs.nginx.com/nginx-management-suite/admin-guides/installation/on-prem/install-guide/
4442
&& 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 \
4644
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABF5BD827BD9BF62 \
4745
&& apt-get -y update \
4846
&& 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 \
5149

5250
# Forward request logs to Docker log collector
5351
&& ln -sf /dev/stdout /var/log/nginx/access.log \

nginx-agent-docker/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ the build script will push the image to your private registry once build is comp
7979
- `NIM_TAGS` - comma separated list of tags for the NGINX Kubernetes Deployment
8080
- `NAP_WAF` - set to `"true"` to enable NGINX App Protect WAF (docker image built using `-w`)
8181
- `NAP_WAF_PRECOMPILED_POLICIES` - set to `"true"` to enable NGINX App Protect WAF precompiled policies (docker image built using `-w`)
82+
- `ACM_DEVPORTAL` - set to `"true"` to enable API Connectivity Manager Developer Portal (docker image built using `-d`)
8283

8384
2. Start and stop using
8485

0 commit comments

Comments
 (0)