Skip to content

Commit fc370f8

Browse files
committed
feat: Update NIC Docker docs, related files
1 parent 81ff963 commit fc370f8

File tree

10 files changed

+167
-97
lines changed

10 files changed

+167
-97
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
files:
3+
- content/includes/use-cases/credential-download-instructions.md
4+
---
5+
6+
1. Log in to [MyF5](https://my.f5.com/manage/s/).
7+
1. Go to **My Products and Plans** > **Subscriptions**.
8+
1. Select the product subscription.
9+
1. Download the **SSL Certificate** and **Private Key** files.
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
---
22
docs:
3+
files:
4+
- content/includes/nim/docker/docker-registry-login.md
5+
- content/includes/use-cases/credential-download-instructions.md
6+
- content/nap-waf/v5/admin-guide/install.md
7+
- content/nginx/admin-guide/installing-nginx/installing-nginx-plus.md
8+
- content/nginx-one/connect-instances/connect-nginx-plus-container-images-to-nginx-one.md
9+
- content/nim/admin-guide/add-license.md
10+
- content/nim/deploy/docker/deploy-nginx-plus-and-agent-docker.md
11+
- content/nim/disconnected/add-license-disconnected-deployment.md
12+
- content/solutions/about-subscription-licenses.md
13+
- content/solutions/r33-pre-release-guidance-for-automatic-upgrades.md
314
---
415

516
1. Log in to [MyF5](https://my.f5.com/manage/s/).
617
2. Go to **My Products & Plans > Subscriptions** to see your active subscriptions.
7-
3. Find your NGINX products or services subscription, and select the **Subscription ID** for details.
18+
3. Find your NGINX subscription, and select the **Subscription ID** for details.
819
4. Download the **JSON Web Token** from the subscription page.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
In order to obtain a container image, you will need the JSON Web Token file or SSL certificate and private key files provided with your NGINX Plus subscription.
2+
3+
These files grant access to the package repository from which the script will download the NGINX Plus package:
4+
5+
{{< tabs name="product_keys" >}}
6+
7+
{{< tab name="JSON Web Token" >}}
8+
9+
{{< include "licensing-and-reporting/download-jwt-from-myf5.md" >}}
10+
11+
{{< /tab >}}
12+
13+
{{< tab name="SSL" >}}
14+
15+
{{< include "licensing-and-reporting/download-certificates-from-myf5.md" >}}
16+
17+
{{< /tab >}}
18+
19+
{{< /tabs >}}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
files:
3+
- content/nginx/admin-guide/installing-nginx/installing-nginx-docker.md
4+
- content/nic/installation/nic-images/registry-download.md
5+
---
6+
7+
This step describes how to use Docker to communicate with the F5 Container Registry located at `private-registry.nginx.com`.
8+
9+
{{< call-out "note" >}}
10+
11+
The steps provided are for Linux. For Mac or Windows, see the [Docker for Mac](https://docs.docker.com/docker-for-mac/#add-client-certificates) or [Docker for Windows](https://docs.docker.com/docker-for-windows/#how-do-i-add-client-certificates) documentation.
12+
13+
For more details on Docker Engine security, you can refer to the [Docker Engine Security documentation](https://docs.docker.com/engine/security/).
14+
15+
{{< /call-out >}}
16+
17+
{{<tabs name="docker_login">}}
18+
19+
{{%tab name="JSON Web Token"%}}
20+
21+
Open the JSON Web Token file previously downloaded from [MyF5](https://my.f5.com) customer portal (for example, `nginx-repo-12345abc.jwt`) and copy its contents.
22+
23+
Log in to the Docker registry using the contents of the JSON Web Token file:
24+
25+
```shell
26+
docker login private-registry.nginx.com --username=<output_of_jwt_token> --password=none
27+
```
28+
29+
{{% /tab %}}
30+
31+
{{%tab name="SSL"%}}
32+
33+
Create a directory and copy your certificate and key to this directory:
34+
35+
```shell
36+
mkdir -p /etc/docker/certs.d/private-registry.nginx.com
37+
cp <path-to-your-nginx-repo.crt> /etc/docker/certs.d/private-registry.nginx.com/client.cert
38+
cp <path-to-your-nginx-repo.key> /etc/docker/certs.d/private-registry.nginx.com/client.key
39+
```
40+
41+
Log in to the Docker registry:
42+
43+
```shell
44+
docker login private-registry.nginx.com
45+
```
46+
47+
{{% /tab %}}
48+
49+
{{% /tabs %}}

content/nginx/admin-guide/installing-nginx/installing-nginx-docker.md

Lines changed: 4 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -88,61 +88,13 @@ where:
8888

8989
- the `jq` command is used to format the JSON output for easier reading and requires the [jq](https://jqlang.github.io/jq/) JSON processor to be installed.
9090

91+
### Download your subscription credential files
9192

93+
{{< include "use-cases/credential-download-instructions.md" >}}
9294

93-
### Download the JSON Web Token or NGINX Plus certificate and key {#myf5-download}
95+
### Set up Docker for the F5 Container Registry
9496

95-
Before you get a container image, you should provide the JSON Web Token file or SSL certificate and private key files provided with your NGINX Plus subscription. These files grant access to the package repository from which the script will download the NGINX Plus package:
96-
97-
{{<tabs name="product_keys">}}
98-
99-
{{%tab name="JSON Web Token"%}}
100-
{{< include "licensing-and-reporting/download-jwt-from-myf5.md" >}}
101-
{{% /tab %}}
102-
103-
{{%tab name="SSL"%}}
104-
1. Log in to the [MyF5](https://my.f5.com) customer portal.
105-
2. Go to **My Products and Plans** > **Subscriptions**.
106-
3. Select the product subscription.
107-
4. Download the **SSL Certificate** and **Private Key** files.
108-
{{% /tab %}}
109-
110-
{{% /tabs %}}
111-
112-
### Set up Docker for NGINX Plus container registry
113-
114-
Set up Docker to communicate with the NGINX Container Registry located at `private-registry.nginx.com`.
115-
116-
{{<tabs name="docker_login">}}
117-
118-
{{%tab name="JSON Web Token"%}}
119-
Open the JSON Web Token file previously downloaded from [MyF5](https://my.f5.com) customer portal (for example, `nginx-repo-12345abc.jwt`) and copy its contents.
120-
121-
Log in to the docker registry using the contents of the JSON Web Token file:
122-
123-
```shell
124-
docker login private-registry.nginx.com --username=<output_of_jwt_token> --password=none
125-
```
126-
{{% /tab %}}
127-
128-
{{%tab name="SSL"%}}
129-
Create a directory and copy your certificate and key to this directory:
130-
131-
```shell
132-
mkdir -p /etc/docker/certs.d/private-registry.nginx.com
133-
cp <path-to-your-nginx-repo.crt> /etc/docker/certs.d/private-registry.nginx.com/client.cert
134-
cp <path-to-your-nginx-repo.key> /etc/docker/certs.d/private-registry.nginx.com/client.key
135-
```
136-
The steps provided are for Linux. For Mac or Windows, see the [Docker for Mac](https://docs.docker.com/docker-for-mac/#add-client-certificates) or [Docker for Windows](https://docs.docker.com/docker-for-windows/#how-do-i-add-client-certificates) documentation. For more details on Docker Engine security, you can refer to the [Docker Engine Security documentation](https://docs.docker.com/engine/security/).
137-
138-
Log in to the docker registry:
139-
140-
```shell
141-
docker login private-registry.nginx.com
142-
```
143-
{{% /tab %}}
144-
145-
{{% /tabs %}}
97+
{{< include "use-cases/docker-registry-instructions.md" >}}
14698

14799
### Pull the image
148100

@@ -192,7 +144,6 @@ For NGINX modules, run:<!-- Is this enough info?-->
192144
docker pull private-registry.nginx.com/nginx-plus/modules:<version-tag>
193145
```
194146

195-
196147
{{< include "security/jwt-password-note.md" >}}
197148

198149
### Push the image to your private registry

content/nic/installation/nic-images/add-image-to-cluster.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ helm install my-release -n nginx-ingress oci://ghcr.io/nginx/charts/nginx-ingres
3636
You can also use the certificate and key from the MyF5 portal and the Docker registry API to list the available image tags for the repositories, for example:
3737

3838
```shell
39-
curl https://private-registry.nginx.com/v2/nginx-ic/nginx-plus-ingress/tags/list --key <path-to-client.key> --cert <path-to-client.cert> | jq
39+
curl https://private-registry.nginx.com/v2/nginx-ic/nginx-plus-ingress/tags/list --key <path-to-client.key> --cert <path-to-client.cert>
4040
```
41-
```text
41+
```json
4242
{
4343
"name": "nginx-ic/nginx-plus-ingress",
4444
"tags": [
@@ -51,9 +51,9 @@ curl https://private-registry.nginx.com/v2/nginx-ic/nginx-plus-ingress/tags/list
5151
```
5252

5353
```shell
54-
curl https://private-registry.nginx.com/v2/nginx-ic-nap/nginx-plus-ingress/tags/list --key <path-to-client.key> --cert <path-to-client.cert> | jq
54+
curl https://private-registry.nginx.com/v2/nginx-ic-nap/nginx-plus-ingress/tags/list --key <path-to-client.key> --cert <path-to-client.cert>
5555
```
56-
```text
56+
```json
5757
{
5858
"name": "nginx-ic-nap/nginx-plus-ingress",
5959
"tags": [
@@ -65,9 +65,9 @@ curl https://private-registry.nginx.com/v2/nginx-ic-nap/nginx-plus-ingress/tags/
6565
```
6666

6767
```shell
68-
$ curl https://private-registry.nginx.com/v2/nginx-ic-dos/nginx-plus-ingress/tags/list --key <path-to-client.key> --cert <path-to-client.cert> | jq
68+
curl https://private-registry.nginx.com/v2/nginx-ic-dos/nginx-plus-ingress/tags/list --key <path-to-client.key> --cert <path-to-client.cert>
6969
```
70-
```text
70+
```json
7171
{
7272
"name": "nginx-ic-dos/nginx-plus-ingress",
7373
"tags": [
@@ -77,6 +77,8 @@ $ curl https://private-registry.nginx.com/v2/nginx-ic-dos/nginx-plus-ingress/tag
7777
}
7878
```
7979

80+
The `jq` command was used in these examples to make the JSON output easier to read.
81+
8082
### Add the image from source
8183

8284
The [Installation with Helm]({{< ref "/nic/installation/installing-nic/installation-with-helm.md#install-the-helm-chart-from-source" >}}) documentation has a section describing how to use sources: these are the unique steps for Docker secrets using JWT tokens.

content/nic/installation/nic-images/registry-download.md

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ The F5 Registry images include versions with NGINX App Protect WAF and NGINX App
1515

1616
To follow these steps, you will need the following pre-requisites:
1717

18-
- [Create a license Secret]({{< ref "/nic/installation/create-license-secret.md" >}})
1918
- [Docker v18.09 or higher](https://docs.docker.com/engine/release-notes/18.09/)
2019

2120
You can also get the NGINX Ingress Controller image using the following alternate methods:
@@ -24,17 +23,13 @@ You can also get the NGINX Ingress Controller image using the following alternat
2423
- [Build NGINX Ingress Controller]({{< ref "/nic/installation/build-nginx-ingress-controller.md" >}})
2524
- For NGINX Open Source, you can pull [an image from DockerHub](https://hub.docker.com/r/nginx/nginx-ingress/)
2625

27-
## Set up Docker for F5 Container Registry
26+
### Download your subscription credential files
2827

29-
Start by setting up Docker to communicate with the F5 Container Registry located at `private-registry.nginx.com`. If you're using Linux, follow these steps to create a directory and add your certificate and key:
28+
{{< include "use-cases/credential-download-instructions.md" >}}
3029

31-
```shell
32-
mkdir -p /etc/docker/certs.d/private-registry.nginx.com
33-
cp <path-to-your-nginx-repo.crt> /etc/docker/certs.d/private-registry.nginx.com/client.cert
34-
cp <path-to-your-nginx-repo.key> /etc/docker/certs.d/private-registry.nginx.com/client.key
35-
```
30+
### Set up Docker for the F5 Container Registry
3631

37-
The steps provided are for Linux. For Mac or Windows, consult the [Docker for Mac](https://docs.docker.com/docker-for-mac/#add-client-certificates) or [Docker for Windows](https://docs.docker.com/docker-for-windows/#how-do-i-add-client-certificates) documentation. For more details on Docker Engine security, you can refer to the [Docker Engine Security documentation](https://docs.docker.com/engine/security/).
32+
{{< include "use-cases/docker-registry-instructions.md" >}}
3833

3934
## Pull the image
4035

@@ -70,7 +65,6 @@ Replace `<version-tag>` with the specific version you need, for example, `{{< ni
7065
docker pull private-registry.nginx.com/nap/waf-enforcer:<waf-version-tag>
7166
```
7267

73-
7468
- For NGINX Plus Ingress Controller with NGINX App Protect DoS, run:
7569

7670
```shell
@@ -83,10 +77,14 @@ Replace `<version-tag>` with the specific version you need, for example, `{{< ni
8377
docker pull private-registry.nginx.com/nginx-ic-nap-dos/nginx-plus-ingress:<version-tag>
8478
```
8579

86-
You can use the Docker registry API to list the available image tags by running the following commands. Replace `<path-to-client.key>` with the location of your client key and `<path-to-client.cert>` with the location of your client certificate. The `jq` command is used to format the JSON output for easier reading.
80+
You can use the Docker registry API to list the available image tags by running the following commands. Replace `<path-to-client.key>` with the location of your client key and `<path-to-client.cert>` with the location of your client certificate.
81+
82+
The `jq` command was used in these examples to make the JSON output easier to read.
8783

84+
```shell
85+
curl https://private-registry.nginx.com/v2/nginx-ic/nginx-plus-ingress/tags/list --key <path-to-client.key> --cert <path-to-client.cert>
86+
```
8887
```json
89-
$ curl https://private-registry.nginx.com/v2/nginx-ic/nginx-plus-ingress/tags/list --key <path-to-client.key> --cert <path-to-client.cert> | jq
9088
{
9189
"name": "nginx-ic/nginx-plus-ingress",
9290
"tags": [
@@ -96,8 +94,12 @@ $ curl https://private-registry.nginx.com/v2/nginx-ic/nginx-plus-ingress/tags/li
9694
"{{< nic-version >}}"
9795
]
9896
}
97+
```
9998

100-
$ curl https://private-registry.nginx.com/v2/nginx-ic-nap/nginx-plus-ingress/tags/list --key <path-to-client.key> --cert <path-to-client.cert> | jq
99+
```shell
100+
curl https://private-registry.nginx.com/v2/nginx-ic-nap/nginx-plus-ingress/tags/list --key <path-to-client.key> --cert <path-to-client.cert>
101+
```
102+
```json
101103
{
102104
"name": "nginx-ic-nap/nginx-plus-ingress",
103105
"tags": [
@@ -106,8 +108,12 @@ $ curl https://private-registry.nginx.com/v2/nginx-ic-nap/nginx-plus-ingress/tag
106108
"{{< nic-version >}}"
107109
]
108110
}
111+
```
109112

110-
$ curl https://private-registry.nginx.com/v2/nginx-ic-dos/nginx-plus-ingress/tags/list --key <path-to-client.key> --cert <path-to-client.cert> | jq
113+
```shell
114+
curl https://private-registry.nginx.com/v2/nginx-ic-dos/nginx-plus-ingress/tags/list --key <path-to-client.key> --cert <path-to-client.cert>
115+
```
116+
```json
111117
{
112118
"name": "nginx-ic-dos/nginx-plus-ingress",
113119
"tags": [
@@ -169,7 +175,7 @@ After pulling the image, tag it and upload it to your private registry.
169175

170176
## Troubleshooting
171177

172-
If you encounter issues while following this guide, here are solutions to common problems:
178+
If you encounter issues while following this guide, here are some possible solutions:
173179

174180
- **Certificate errors**
175181
- **Likely Cause**: Incorrect certificate or key location, or using an NGINX Plus certificate.
@@ -181,7 +187,7 @@ If you encounter issues while following this guide, here are solutions to common
181187
182188
- **Can't pull the image**
183189
- **Likely Cause**: Mismatched image name or tag.
184-
- **Solution**: Double-check the image name and tag against the [Tech Specs guide]({{< ref "/nic/technical-specifications.md#images-with-nginx-plus" >}}).
190+
- **Solution**: Double-check the image name and tag matches the [Technical specifications]({{< ref "/nic/technical-specifications.md#images-with-nginx-plus" >}}) document.
185191

186192
- **Failed to push to private registry**
187193
- **Likely Cause**: Not logged into your private registry or incorrect image tagging.

documentation/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ If you're interested in contributing to the [NGINX documentation website](https:
1919
- [Managing content with Hugo](/documentation/writing-hugo.md)
2020
- [Proposals](/documentation/proposals/README.md)
2121
- [Set up pre-commit](/documentation/pre-commit.md)
22+
- [Using include files](/documentation/include-files.md)
2223
- [Writing style guide](/documentation/style-guide.md)

documentation/include-files.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Using Include files
2+
3+
_Include files_, often referred to as _includes_, are Markdown files with self-contained text fragments used by Hugo for content re-use.
4+
5+
They enable contributors to maintain a single source of truth for information that is often repeated, such as how to download credential files.
6+
7+
We use them to [avoid repeating ourselves](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself), and create consistency in similar instructional steps.
8+
9+
Include files are designed to be context-agnostic and should not rely on or assume any prior content.
10+
11+
The files are located in the [content/includes](https://github.com/nginxinc/docs/tree/main/content/includes) folder, and are implemented using the Hugo `include` shortcode:
12+
13+
```text
14+
{{< include "use-cases/docker-registry-instructions.md" >}}
15+
```
16+
17+
Putting the previous example in any Markdown file would embed the contents of `content/includes/use-cases/docker-registry-instructions.md` wherever the shortcode was used.
18+
19+
For guidance on other Hugo shortcodes, read the [Managing content with Hugo](/documentation/writing-hugo.md) document.
20+
21+
## Guidelines for include files
22+
23+
To make sure includes are effective and easy to maintain, follow these guidelines:
24+
25+
- **Only use includes for repeated content**: Create an include only if the content appears in at least **two locations**. Using an include for single-use content adds unnecessary complexity and makes maintenance harder.
26+
- **Keep includes small and modular**: Write narrowly scoped snippets to maximize flexibility and reuse.
27+
- **Avoid nesting includes**: If there’s another way to achieve the same outcome, avoid nesting includes. While possible, it complicates reviews and maintenance. A flat structure is simple.
28+
- **Don't include heading**: Do not include headings in include files. These headings won't appear in a document's table of contents and may break the linear flow of the surrounding content. Add headings directly to the document instead.
29+
- **Don't start documents with includes**: The opening of most document is the introduction which explains its purpose. Includes are reused text, so starting multiple documents with identical content could look odd, especially in search results.
30+
- **Do not add the F5 prefix to product names in includes**: The brand name is required only on [the first mention in a document](/documentation/style-guide.md#f5-brand-trademarks-and-product-names).
31+
32+
## Include file index
33+
34+
To aid in discoverability of include files, this index is maintained to offer contributors a reference for existing entries.
35+
36+
When viewing an include file, you may also see the `files`: parameter in the frontmatter, which shows where the file is currently in use.
37+
38+
| **_File name_** | **_Description_** |
39+
| ----------------| ------------------ |
40+
| [_licensing-and-reporting/download-jwt-from-myf5.md_](/content/includes/licensing-and-reporting/download-jwt-from-myf5.md) | Instructions for downloading a JSON Web Token from MyF5 |
41+
| [_licensing-and-reporting/download-certificates-from-myf5.md_](/content/includes/licensing-and-reporting/download-certificates-from-myf5.md) | Instructions for downloading certificate files from MyF5 |
42+
| [_use-cases/credential-download-instructions.md_](/content/includes/use-cases/credential-download-instructions.md) | Parallel tabbed instructions for downloading credential files from MyF5 |
43+
| [_use-cases/docker-registry-instructions.md_](/content/includes/use-cases/docker-registry-instructions.md) | Parallel tabbed instructions for listing Docker images from the F5 Registry |

0 commit comments

Comments
 (0)