Skip to content

Commit 1d66dc5

Browse files
committed
feat: Add detail about official docker image
1 parent ada2662 commit 1d66dc5

File tree

3 files changed

+54
-2
lines changed

3 files changed

+54
-2
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
---
3+
4+
```dockerfile
5+
# syntax=docker/dockerfile:1
6+
7+
# Base image
8+
FROM nginx:1.25.5-bookworm
9+
10+
# Install F5 WAF for NGINX v5 module
11+
RUN --mount=type=secret,id=nginx-crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644 \
12+
--mount=type=secret,id=nginx-key,dst=/etc/ssl/nginx/nginx-repo.key,mode=0644 \
13+
apt-get update \
14+
&& apt-get install --no-install-recommends --no-install-suggests -y \
15+
apt-transport-https \
16+
lsb-release \
17+
ca-certificates \
18+
wget \
19+
gnupg \
20+
&& wget https://cs.nginx.com/static/keys/nginx_signing.key \
21+
&& gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/nginx.gpg \
22+
--import nginx_signing.key \
23+
&& chmod 644 /etc/apt/trusted.gpg.d/nginx.gpg \
24+
&& printf "deb https://pkgs.nginx.com/app-protect-x-oss/debian `lsb_release -cs` nginx-plus\n" | \
25+
tee /etc/apt/sources.list.d/nginx-app-protect.list \
26+
&& wget -P /etc/apt/apt.conf.d https://cs.nginx.com/static/files/90pkgs-nginx \
27+
&& apt-get update \
28+
&& apt-get install --no-install-recommends --no-install-suggests -y nginx=1.25.5-1~bookworm app-protect-module-oss \
29+
&& apt-get remove --purge --auto-remove -y apt-transport-https lsb-release gnupg wget \
30+
&& rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/nginx-app-protect.list
31+
```

content/waf/install/docker.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,18 @@ http {
144144

145145
## Create a Dockerfile
146146

147-
In the same folder as your credential and configuration files, create a _Dockerfile_ based on your desired operating system image using an example below:
147+
In the same folder as your credential and configuration files, create a _Dockerfile_ based on your desired operating system image using an example from the following sections.
148+
149+
Alternatively, you may want make your own image based on a Dockerfile using the official NGINX image:
150+
151+
{{< details summary="Dockerfile based on official image" >}}
152+
153+
This example uses NGINX Open Source as a base: it requires NGINX to be installed as a package from the official repository, instead of being compiled from source.
154+
155+
{{< include "/waf/dockerfiles/official-oss.md" >}}
156+
157+
{{< /details >}}
158+
148159

149160
{{< call-out "note" >}}
150161

content/waf/install/kubernetes.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,17 @@ This pattern is present in the [Virtual environment]({{< ref "/waf/install/virtu
3535

3636
## Create a Dockerfile
3737

38-
In the same folder as your credential and configuration files, create a _Dockerfile_ based on your desired operating system image using an example below:
38+
In the same folder as your credential files, create a _Dockerfile_ based on your desired operating system image using an example from the following sections.
39+
40+
Alternatively, you may want make your own image based on a Dockerfile using the official NGINX image:
41+
42+
{{< details summary="Dockerfile based on official image" >}}
43+
44+
This example uses NGINX Open Source as a base: it requires NGINX to be installed as a package from the official repository, instead of being compiled from source.
45+
46+
{{< include "/waf/dockerfiles/official-oss.md" >}}
47+
48+
{{< /details >}}
3949

4050
{{< call-out "note" >}}
4151

0 commit comments

Comments
 (0)