Skip to content

Commit 3d3aaed

Browse files
committed
update dockerfile for nap
1 parent 652ce5a commit 3d3aaed

File tree

10 files changed

+62
-8
lines changed

10 files changed

+62
-8
lines changed

content/includes/waf/dockerfiles/alpine-plus.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ RUN --mount=type=secret,id=nginx-crt,dst=/etc/apk/cert.pem,mode=0644 \
2727
&& ln -sf /dev/stderr /var/log/nginx/error.log \
2828
&& rm -rf /var/cache/apk/*
2929

30+
# Securely copy the JWT license:
31+
RUN --mount=type=secret,id=license-jwt,dst=license.jwt \
32+
cp license.jwt /etc/nginx/license.jwt
33+
3034
# Expose port
3135
EXPOSE 80
3236

content/includes/waf/dockerfiles/amazon-plus.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ RUN --mount=type=secret,id=nginx-crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644
2828
&& ln -sf /dev/stdout /var/log/nginx/access.log \
2929
&& ln -sf /dev/stderr /var/log/nginx/error.log
3030

31+
# Securely copy the JWT license:
32+
RUN --mount=type=secret,id=license-jwt,dst=license.jwt \
33+
cp license.jwt /etc/nginx/license.jwt
34+
3135
# Expose port
3236
EXPOSE 80
3337

content/includes/waf/dockerfiles/debian-plus.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ RUN --mount=type=secret,id=nginx-crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644
4141
&& apt-get clean \
4242
&& rm -rf /var/lib/apt/lists/*
4343

44+
# Securely copy the JWT license:
45+
RUN --mount=type=secret,id=license-jwt,dst=license.jwt \
46+
cp license.jwt /etc/nginx/license.jwt
47+
4448
# Expose port
4549
EXPOSE 80
4650

content/includes/waf/dockerfiles/oracle-plus.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ RUN --mount=type=secret,id=nginx-crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644
2929
&& ln -sf /dev/stdout /var/log/nginx/access.log \
3030
&& ln -sf /dev/stderr /var/log/nginx/error.log
3131

32+
# Securely copy the JWT license:
33+
RUN --mount=type=secret,id=license-jwt,dst=license.jwt \
34+
cp license.jwt /etc/nginx/license.jwt
35+
3236
# Expose port
3337
EXPOSE 80
3438

content/includes/waf/dockerfiles/rhel8-plus.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ RUN --mount=type=secret,id=nginx-crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644
4545
&& ln -sf /dev/stdout /var/log/nginx/access.log \
4646
&& ln -sf /dev/stderr /var/log/nginx/error.log
4747

48+
# Securely copy the JWT license:
49+
RUN --mount=type=secret,id=license-jwt,dst=license.jwt \
50+
cp license.jwt /etc/nginx/license.jwt
51+
4852
# Expose port
4953
EXPOSE 80
5054

content/includes/waf/dockerfiles/rhel9-plus.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ RUN --mount=type=secret,id=nginx-crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644
3030
&& ln -sf /dev/stdout /var/log/nginx/access.log \
3131
&& ln -sf /dev/stderr /var/log/nginx/error.log
3232

33+
# Securely copy the JWT license:
34+
RUN --mount=type=secret,id=license-jwt,dst=license.jwt \
35+
cp license.jwt /etc/nginx/license.jwt
36+
3337
# Expose port
3438
EXPOSE 80
3539

content/includes/waf/dockerfiles/rocky9-plus.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ RUN --mount=type=secret,id=nginx-crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644
3030
&& ln -sf /dev/stdout /var/log/nginx/access.log \
3131
&& ln -sf /dev/stderr /var/log/nginx/error.log
3232

33+
# Securely copy the JWT license:
34+
RUN --mount=type=secret,id=license-jwt,dst=license.jwt \
35+
cp license.jwt /etc/nginx/license.jwt
36+
3337
# Expose port
3438
EXPOSE 80
3539

content/includes/waf/dockerfiles/ubuntu-plus.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ RUN --mount=type=secret,id=nginx-crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644
4141
&& apt-get clean \
4242
&& rm -rf /var/lib/apt/lists/*
4343

44+
# Securely copy the JWT license:
45+
RUN --mount=type=secret,id=license-jwt,dst=license.jwt \
46+
cp license.jwt /etc/nginx/license.jwt
47+
4448
# Expose port
4549
EXPOSE 80
4650

content/includes/waf/install-build-image.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Your folder should contain the following files:
1313
- _Dockerfile_
1414
- _custom_log_format.json_ (Optional)
1515

16-
To build an image, use the following command, replacing `<your-image-name>` as appropriate:
16+
To build an image for NGINX Plus, use the following command, replacing `<your-image-name>` as appropriate:
1717

1818
```shell
1919
sudo docker build --no-cache --platform linux/amd64 --secret id=nginx-crt,src=nginx-repo.crt --secret id=nginx-key,src=nginx-repo.key --secret id=license-jwt,src=license.jwt -t <your-image-name> .
@@ -24,6 +24,17 @@ A RHEL-based system would use the following command instead:
2424
```shell
2525
podman build --no-cache --secret id=nginx-crt,src=nginx-repo.crt --secret id=nginx-key,src=nginx-repo.key --secret id=license-jwt,src=license.jwt -t <your-image-name> .
2626
```
27+
To build an image for NGINX Open Source, use the following command, replacing `<your-image-name>` as appropriate:
28+
29+
```shell
30+
sudo docker build --no-cache --platform linux/amd64 --secret id=nginx-crt,src=nginx-repo.crt --secret id=nginx-key,src=nginx-repo.key -t <your-image-name> .
31+
```
32+
33+
A RHEL-based system would use the following command instead:
34+
35+
```shell
36+
podman build --no-cache --secret id=nginx-crt,src=nginx-repo.crt --secret id=nginx-key,src=nginx-repo.key -t <your-image-name> .
37+
```
2738

2839
{{< call-out "note" >}}
2940

content/waf/install/kubernetes.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ To review supported operating systems, read the [Technical specifications]({{< r
3636

3737
{{< include "licensing-and-reporting/download-certificates-from-myf5.md" >}}
3838

39+
### Download your JSON web token
40+
41+
To use NGINX Plus, you will need to download the the JWT license file associated with your NGINX Plus subscription from the MyF5 Customer Portal:
42+
43+
{{< include "licensing-and-reporting/download-jwt-from-myf5.md" >}}
44+
3945
## Create a Dockerfile
4046

4147
In the same folder as your credential files, create a _Dockerfile_ based on your [desired operating system]({{< ref "/waf/fundamentals/technical-specifications.md#supported-operating-systems" >}}) image using an example from the following sections.
@@ -206,9 +212,20 @@ Your folder should contain the following files:
206212

207213
- _nginx-repo.crt_
208214
- _nginx-repo.key_
215+
- _license.jwt_ (Only necessary when using NGINX Plus)
209216
- _Dockerfile_
210217

211-
To build an image, use the following command, replacing `<your-image-name>` as appropriate:
218+
To build an image for NGINX Pluse, use the following command, replacing `<your-image-name>` as appropriate:
219+
220+
```shell
221+
sudo docker build --no-cache --platform linux/amd64 \
222+
--secret id=nginx-crt,src=nginx-repo.crt \
223+
--secret id=nginx-key,src=nginx-repo.key \
224+
--secret id=license-jwt,src=license.jwt \
225+
-t <your-image-name> .
226+
```
227+
228+
To build an image for NGINX Open Source, use the following command, replacing `<your-image-name>` as appropriate:
212229

213230
```shell
214231
sudo docker build --no-cache --platform linux/amd64 \
@@ -226,12 +243,6 @@ From this point, the steps change based on your installation method:
226243

227244
## Use Helm to install F5 WAF for NGINX
228245

229-
### Download your JSON web token
230-
231-
To use NGINX Plus, you will need to download the the JWT license file associated with your NGINX Plus subscription from the MyF5 Customer Portal:
232-
233-
{{< include "licensing-and-reporting/download-jwt-from-myf5.md" >}}
234-
235246
### Get the Helm chart
236247

237248
To get the Helm chart, first configure Docker for the F5 Container Registry.

0 commit comments

Comments
 (0)